Installing Liferay on Oracle WebLogic 10.3

Liferay Home is one folder above the domain to which you will be installing Liferay.

For example, if your domain location is /Oracle/Middleware/user_projects/domains/base_domain, then your Liferay Home is /Oracle/Middleware/user_projects/domains.

For this section, we will use $WEBLOGIC_HOME to refer to your WebLogic server’s installation /Oracle/Middleware.

Before you begin, make sure you have downloaded the latest Liferay .war file and Liferay Portal dependencies from The Liferay .war file should be called liferay-portal-6.1.x-<date>.war and the dependencies file should be called liferay-portal-dependencies-6.1.x-<date>.zip.

These instructions assume you have already configured a domain and server and that you have access to the WebLogic console.

If you still have the mainWebApp module installed, remove it first.

Let’s get started by installing the JAR files Liferay needs.

Dependency Jars

Liferay needs the JAR files contained in the Liferay Dependencies Archive and the driver JAR file applicable for your database.

  1. Navigate to the folder that corresponds to the domain to which you will be installing Liferay. Inside this folder is a lib folder. Unzip the Liferay Dependencies Archive to this folder so the dependency .jar files reside in the lib folder.

  2. If WebLogic does not already have access to the JDBC driver for your database, copy the driver to your domain’s lib folder as well.

So far so good. Your JAR files are in place and ready for Liferay.

Start Oracle WebLogic if you want to configure your database and/or mail session within Oracle WebLogic.

Database Configuration

If you want WebLogic to manage your data source, use the following procedure. If you want to use Liferay’s built-in data source, you can skip this section.

Figure 14.44: WebLogic Data Sources

Figure 14.44: WebLogic Data Sources

  1. Select Services → Data Sources. Click New → Generic Data Source.

  2. Give your data source a name, such as Liferay Data Source. The JNDI name should be jdbc/LiferayPool.

  3. Choose the type of database and click Next. From the screenshot, you can see we have chosen MySQL. The database driver class is selected automatically.

    Figure 14.45: Creating a data source in WebLogic 10.3

    Figure 14.45: Creating a data source in WebLogic 10.3

  4. Click Next three times. You should be on the Connection Properties screen. Enter the database name, the host name, the port, the database user name and the password. WebLogic uses this information to construct the appropriate JDBC URL to connect to your database. Click Next.

  5. WebLogic next confirms the information you provided. For MySQL, some additional parameters must be added to the URL. Modify the JDBC URL so it has the proper parameters. Provide your database name, host name, user name and password as the values. Click Next.

  6. Click Test Configuration to make sure WebLogic can connect to your database successfully. When it does, click Finish.

  7. You will be back to the list of data sources. Notice your new data source has no value in the Target column. Click on your data source to edit it.

  8. Click the Targets tab and check off the server instance(s) to which you wish to deploy your data source. Then click Save.

Next, let’s configure a mail session in WebLogic.

Mail Configuration

If you want WebLogic to manage your mail sessions, use the following procedure. If you want to use Liferay’s built-in mail sessions, you can skip this section.

Figure 14.46: WebLogic Mail Sessions

Figure 14.46: WebLogic Mail Sessions

  1. Select Mail Sessions and create a new mail session which points to your mail server.

  2. Give it the name Liferay Mail and give it the JNDI name of mail/MailSession and click Next.

  3. Choose your server and then click Finish.

Now let’s make sure Liferay can access this mail session.

Domain Configuration - Continued

Let’s revisit domain configuration to make sure we’ll be able to access your data source and mail session from Liferay Portal.

  1. Create a file in the Liferay Home folder, which is one folder up from your domain’s home folder.

    If you are using WebLogic to manage your data source, add the following to your file in Liferay Home to refer to your data source:

    If you are using Liferay Portal to manage your data source, follow the instructions in the Deploy Liferay section for using the setup wizard.

    If want to use Liferay Portal to manage your mail session, you can configure the mail session in the Control Panel. After starting your portal as described in the Deploy Liferay section, go to Control Panel → Server Administration → Mail and enter the settings for your mail session.

    If you are using WebLogic to manage your mail session, add the following to your file to reference that mail session:
  2. In order for special characters and other languages to display correctly, you must set -Dfile.encoding=utf8 under JAVA_OPTIONS in the setDomainEnv file.

  3. Lastly, you must provide WebLogic a reference to Java Server Faces (JSF) to use that library. Insert the following deployment descriptor within the <weblogic-web-app> element of WEB-INF/weblogic.xml found in your Liferay Portal .war :


Now its the moment you’ve been waiting for: Liferay deployment!

Deploy Liferay

This section provides instructions for deploying Liferay to your application server domain.

Before you deploy Liferay Portal, consider whether you want to use the setup wizard.

  • Start the setup wizard along with Liferay Portal - Do this if you want to configure your portal, set up your site’s administrative account and/or manage your database within Liferay.

    If this is your first time starting Liferay Portal 6.1, the setup wizard is invoked on server startup. If you want to re-run the wizard, specify setup.wizard.enabled=true in your properties file (e.g.


    The setup wizard is invoked during server startup.

  • Start Liferay Portal without invoking the setup wizard - Do this if want to preserve your current portal settings.

    To start the server without triggering the setup wizard, specify setup.wizard.enabled=false in your properties (e.g. or file).


    The file the setup wizard creates has setup.wizard.enabled=false conveniently specified for you.

Now, let’s deploy Liferay Portal.

  1. Start WebLogic.

  2. Select Deployments and click the Install button. Upload jsf-1.2.war from WebLogic’s common files directory and select Install this deployment as a library.

    Figure 14.47: WebLogic Deployments

    Figure 14.47: WebLogic Deployments

  3. After installing the JSF libraries, go back to deployments and select the Liferay .war file from the file system or click the Upload Your File(s) link to upload it and then click Next.

  4. Select Install this deployment as an application and click Next.

  5. If the default name is appropriate for your installation, keep it. Otherwise, give it a name of your choosing and click Next.

  6. Click Finish. After the deployment finishes, click Save.

    Liferay launches in one of the following manners:

    • If the setup wizard was disabled, your site’s home page opens in your browser at http://localhost:7001.

    • Otherwise, the setup wizard opens in your browser.

Please see the section above for how to use the setup wizard.

Congratulations! You are now running Liferay on Oracle WebLogic.

« Installing Liferay on WebLogic 10Installing Liferay on WebSphere 8.0 »
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0