The official name of WebLogic is "Oracle WebLogic Server 11g Standard Edition". It is part of a broader range of products called "Oracle Fusion Middleware", which offers a complete support for enterprise service-oriented applications (SOA). I'm currently working with WebLogic 10.3.4, which is the first version that supports JSF 2.0, my favority web framework. WebLogic is available for download on Oracle's website. Go to the download page to get your copy. To install it:
- Unzip the file in your development folder. For example /home/you/java/weblogic.
- Create the environment variable JAVA_HOME, pointing to your JDK installation.
- Create the environment variable MW_HOME pointing to /home/you/java/weblogic.
- Go to the command line and run the installation configuration script $MW_HOME/configure.[sh/cmd].
- Create the domain to start working with WebLogic, running the command MW_HOME/wlserver/common/bin/config.[sh/cmd] and following the instructions on the screen.
- Start a web browser and open the url http://localhost:7001/console to access the administration console.
Now, we have to configure the IDE to start, debug, and stop WebLogic, as well as deploy Java EE applications. Because most developers actually use Eclipse as a working IDE, let's configure it, installing the necessary plugin. I'm using Oracle Enterprise Pack for Eclipse (OEPE), a plugin that empowers Eclipse to develop Enterprise Java Application for Oracle Products. To install it:
- Open Eclipse and go to the menu Help - Install New Software...
- Add a new repository by clicking on Add...
- Inform the name Oracle Enterprise Pack for Eclipse and the URL http://download.oracle.com/otn_software/oepe/indigo if you are using Eclipse Indigo, or http://download.oracle.com/otn_software/oepe/helios if you are still using Eclipse Helios.
- Follow the instructions and restart Eclipse to finalize.
- Go to the menu Windows - Show View and select Servers.
- Click with the right button of the mouse on the working area of the view and select New - Server.
- In the list of server types, go to the category Oracle and select Oracle WebLogic Server 11gR1 (10.3.4), or the version of WebLogic that you have installed. It's important to select the right version, otherwise an error will continously occur.
- Make sure that the field Server's host name contains the value localhost and press Next.
- In the field WebLogic home inform the path /home/you/java/weblogic/wlserver.
- In the field Java home inform the path to your JDK installation.
- You can optionally install some server extensions. I recommend to install all available extensions, clicking on Install, besides each item. Press Next to continue.
- Leave the option Local selected in the Server type field and inform the location of the domain. The domain was created in the first part of this tutorial, when we executed the configuration assistent.
- Press Finish to conclude.
You may face a particular problem if the environment variable CLASSPATH is already set in the environment. A error message like "[Something] was unexpected at this time." may appear when trying to start the server. To solve that:
ReplyDelete1) Edit the file startWebLogic.[sh/cmd], located in the domain folder.
2) Add the line "set CLASSPATH=" before the call line. For example:
...
set CLASSPATH=
call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %*
Save the file and try to start the server again. It may work now.
I take "[Something] was unexpected at this time." error too. I move weblogic installment folder from program files folder to C driver, then it works.
Delete