Adia
Adia

Reputation: 1211

ERROR [PortletBagFactory:123] java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet

After upgrading from Liferay 6.0.6 to 6.1 and Tomcat 6 to 7, when running the build.xml file, I get the following error. I have checked liferay forums, but no help. Any idea how to fix this? Thanks!

07:26:07,593 ERROR [PortletBagFactory:123] java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
    at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:120)
    at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:524)
    at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:302)
    at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:115)
    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:111)
    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:188)

Upvotes: 0

Views: 2017

Answers (1)

Prakash K
Prakash K

Reputation: 11698

com.liferay.portlet.StrutsPortlet is a class in the portal-impl.jar. It seems you are using this class in your custom plugin portlet.

Any class from portal-impl.jar is not recommended to be used in plugin-portlets and starting from 6.1 they have completely restricted the usage of classes from portal-impl.jar and here is the verdict from Liferay-staff in a forum post.

So I guess you are out-of-luck here and you better refrain from using StrutsPortlet or any of the class from portal-impl.jar, you will need to find another way to achieve what you already did using this class. It will be a development effort but will help with future releases and best practices.

Here is a link to understand as to why not to use portal-impl.jar.

Upvotes: 2

Related Questions