angle-left Back

JSF 2.2 with Liferay 6.2 on WebSphere

bernd kopinits, modified 7 Months ago.

JSF 2.2 with Liferay 6.2 on WebSphere

New Member Posts: 20 Join Date: 12/7/14 Recent Posts
we're currently trying to move out project which includes many PrimeFaces 6.1 portlets from a Tomcat to WebSphere.

We followed this docu to install Liferay 6.2 EE SP17 on a WebSphere which works fine.

Then we followed this docu which installs the applications after we drop them into the $LIFERAY_HOME/deploy folder. But when we try to start them, it fails because the faces context is null.

Then we found this docu. So we created a folder containing the files
  • jsf-api-2.2.14.jar (com.sun.faces - jsf-api - 2.2.14)
  • jsf-impl-2.2.14.jar (com.sun.faces - jsf-impl - 2.2.14)
  • liferay-faces-init-3.2.4-ga5.jar (com.liferay.faces - liferay-faces-init - 3.2.4-ga5)

and added them as a shared library in the WebSphere console. After changing the class loader order to parent last, setting the JSF implementation to SunRI1.2 and adding the shared library to the application, we were able to start the application and we were able to use these portlets in liferay.

This worked well for the first two war files we deployed, but not for the third one. We are using freemarker in some of those portlets and during the start we're getting java.lang.NoClassDefFoundError: freemarker.template.TemplateException. The freemarker dependency ha the scope provided in our project.

What's the best way to deal with this? Thank you, Bernd
Neil Griffin, modified 7 Months ago.

RE: JSF 2.2 with Liferay 6.2 on WebSphere

LIFERAY STAFF Liferay Legend Posts: 2540 Join Date: 7/26/05 Recent Posts
Hi Bernd,

I'm happy to learn that the documentation helped you get your PrimeFaces 6.1 portlets working on Liferay 6.2 emoticon

I think though, that the java.lang.NoClassDefFoundError regarding Freemarker problem might be unrelated to JSF.

Would it be possible for you to create a very simple plain Java portlet (simply extends javax.portlet.GenericPortlet) without any JSF dependencies? Then see if you still get the NoClassDefFoundError when you try to work with Freemarker.

Kind Regards,