Wednesday, August 4, 2010

WLST Scripting with Oracle Enterprise Pack for Eclipse (OEPE)

With the new OEPE you can create and run all your WLST scripts from Eclipse. This blogpost will give you a WLST jumpstart in the Eclipse IDE. The WLST / Phyton support for the Eclipse IDE is one of the many new OEPE features. For more info read the Markus Eisele great blogpost about all the new and cool features of OEPE.

Let's do some WLST scripting. Before you can start you need to download and install WebLogic. Off course you also need to download OEPE

Start Eclipse and provide the workspace folder. 

Click on Workbench
You need to create a new Project where WebLogic can be targeted. Choose for example Dynamic Web Project. ( You don't need to create a Web Application for WLST scripting )
Provide the name of the Project and click on New Runtime.

Open the Bea or Oracle Node and select a WebLogic release. The latest WLS release is 11gR1 PatchSet 2
Browse to the WebLogic Home this is the wlserver_10.3 folder in the FMW Home.
Click on Finish.
Select your just created web project and open the project options. Go to the Project Facets and enable the Oracle WebLogic Scripting Tools support.
This enables the WLST scripting for this project.

Select the wlst folder and create a new WLST Script.
Choose for a default template or make a empty wlst file. In this case we will use "Create Basic WebLogic Domain"
This will always create a file called in the wlst folder.
Change the domain folder in /user_project/domains/...
Rename this wlst file else it will be overwritten by a other WLST script creation.
Select your Domain script and in Run As, choose for WLST Run.
This will create the WebLogic Domain.
Next step is to start this WebLogic Domain. Select New and go to the Server node and click on Next.
Choose for Oracle WebLogic Server 11gR1 PatchSet 2 in the Oracle node.
Browse to the new WLS Domain folder.
In the server window you can start this WebLogic server.
After the WebLogic is started, you can open the MBean Browser. Go to the Window Menu , Show View and choose Other.
Select WebLogic MBean Explorer in the WebLogic node.
This will give you an overview of all the MBeans. You can drag and drop a MBean to your WLST script.
To this WLS Domain we can add some JMS messaging by creating a new WLST Script.
Select the "Configure JMS System Resource" Template.
Rename this script.
And when you run this script you will see the output in the console window.
That's all for the jumpstart.


  1. Great post, thanks!

    BTW: This configures a proper Jython interpreter for WLST in your workspace. From now on you can create new PyDev projects choosing that WLST interpreter and develop scripts in a clean PyDev project. You can even delete the original Dynamic Web Project.

  2. Thank you!
    I got an issue when I tried to run script under Windows, jython failed to interpret 'os' variable, so I provided path variables (BEA_HOME and WL_HOME) directly in py file.

  3. Hello,

    Is there something similar for JDeveloper ?


    1. Hi,

      Too bad , OEPE is more focused on weblogic (wlst and also with deployment plans ) than JDeveloper.


  4. Any Comments on

  5. But this is all focused on local development, on a single version of weblogic. What if you are deploying to managed servers on a remote machine. Can you use any of this tooling to facilitate creating and running wlst scripts on those remote deployments?

  6. Hi Edwin,

    I have followed the steps given here. But i am not getting Weblogic MBean Browser in views. Can you suggest.


  7. Got it MBean Browser is integrated in Server window itself in