Enterprise Java

Installing Liferay 6.2 Enterprise Edition on Websphere 8.0

Preparing Websphere for Liferay

When the application server binaries have been installed, start the Websphere application server (WAS) Profile Management Tool to create a profile appropriate for Liferay and follow the instructions as described here in the official Liferay documentation. The instructions are for installing Liferay 6.2 on Websphere 8.5, but I have installed it on Websphere 8.0 successfully following the same instructions.
 
 
 
 

Picture 1: Created profile LiferayJavaCodeGeeks
Picture 1: Created profile LiferayJavaCodeGeeks

Notes

  1. I did not want Websphere to manage the database connections, so I skipped the database step as long as I am using Liferay’s standard database configuration.
  2. I also skipped the mail configuration step because I did not care for that.
  3. Before completing the new profile wizard note down the port of where the administrative console runs (in my case it was 9062)
  4. I did not create the file portal-ext.properties. I used the Liferay setup wizard.
  5. I start and stop Websphere through Rational Application Developer for Websphere (see here). On windows you can also start stop the server using the IBM Websphere start menu tools.

Deploy Liferay

  1. Click Applications → New Application → New Enterprise Application.
  2. Browse to the Liferay .war file and click Next. I downloaded the Enterprise Edition 6.2 trial standalone. You will get an email with an xml license file.
  3. Leave Fast Path selected and click Next. Ensure that Distribute Application has been checked, and click Next again.
  4. Choose the Websphere runtimes and/or clusters where you want Liferay deployed. Click Next.
  5. Map Liferay to your preferred root context (/javacodegeeks/ for example) and click Next.
  6. Ensure that you have made all the correct choices and click Finish. When Liferay has installed, click Save to Master Configuration.

You’ve now installed Liferay, but don’t start it yet. If you wish to use PACL, you have one more thing to configure (see Enabling Security for Portal Access Control Lists section – Liferay documentation).

Picture 2:  Windows start menu tools
Picture 2: Windows start menu tools

Starting Liferay

  1. Click Applications → Application Types → Websphere enterprise applications
  2. Select the Liferay .war checkbox and click start

    Picture 3: Starting Liferay
    Picture 3: Starting Liferay
  3. If no error shows up, go to http://localhost:<yourport>/<your contextroot>
  4. If Liferay redirects you to a page that informs you that a license is missing. Drop the xml license file that Liferay sent you by email at <WebsphereHome>\AppServer\profiles\<yourprofile>\Liferay\deploy\ and restart the server. You must see the Liferay portal basic configuration page. That means that you have successfully installed Liferay on Websphere application server. Enjoy!

Picture 4: Successfully started Liferay
Picture 4: Successfully started Liferay

Common issues

Identifying the ports

If you are not familiarized with the Websphere application server, like me, It may be difficult to find where the application server administration control and Liferay runs. The administration control of Websphere runs at http://localhost:9062/ibm/console/ in my case (the default port is 9063 I think). In your case the port may be different. You can also see the port where the administration console runs from Websphere logs when it starts. You can use again the windows start menu tools for IBM Websphere as shown at the picture 2 above.

Picture 5: Administration console port
Picture 5: Administration console port

Once you have successfully launched the administration console you can see a complete catalogue of the ports. Click Servers→Websphere application servers→<YourServerName>→ Configuration tab → Communications → Ports

Picture 6: Identifying the ports
Picture 6: Identifying the ports

As you can see the administrative console runs on port 9062 and Liferay should run on port 9082. So if the context root you have chosen is javacodegeeks Liferay should run at http://localhost:9082/javacodegeeks

Increasing JVM Maximum heap size

One other common issue is that when Liferay is deployed to WAS the pages are loaded very slow or keep hanging until java.lang.OutOfMemoryError comes up and the server stops. We can easily increase WAW maximum heap size – in most cases it solves this issue.

In Websphere administration console:

  1. Click Servers -> Server Types -> Websphere application servers -> Server Infrastructure -> Java and Process Management -> Process definition.
  2. In Additional Properties section, select Java Virtual Machine
  3. In General Properties section, put 256 for “Initial heap size” and 1024 for “Maximum heap size”.
  4. Done, restart Websphere.

Picture 7: Increase WAS maximum heap size
Picture 7: Increase WAS maximum heap size

References

  1. Liferay documentation
  2. http://www.mkyong.com/websphere/how-to-increase-websphere-jvm-memory/

Grigoris Iliopoulos

Grigoris Iliopoulos is a Java Developer at ICAP Group, interested in J2EE technologies and open source enthusiast. He has worked as a developer in a wide variety of application/services. He holds a degree in Computer Science from the University of Crete and lives in Athens.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button