0

从 Liferay 6.0.6 升级到 6.1 和 Tomcat 6 升级到 7 后,运行 build.xml 文件时,出现以下错误。我检查了liferay论坛,但没有帮助。知道如何解决这个问题吗?谢谢!

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)
4

1 回答 1

2

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.

于 2012-09-14T10:07:50.103 回答