Forums de discussion

Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Amir H. Moin, modifié il y a 13 années.

Struts Portlet Deployment Errors in Liferay Portal 6.0.4

New Member Publications: 3 Date d'inscription: 27/07/10 Publications récentes
Hello,

I've downloaded the sample-struts-liferay-portlet from Liferay's SVN repository and imported in Eclipse Helios. I use Tomcat 6.0.26 and Liferay Portal 6.0.4 with Plugins SDK.

It compiles well, but at the startup of Tomcat gives the errors below.
Any help would be kindly appreciated. Thanks in advance.


Aug 13, 2010 8:15:19 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory sample-struts-liferay-portlet
08:15:24,408 INFO [PortletHotDeployListener:222] Registering portlets for sample-struts-liferay-portlet
08:15:24,817 ERROR [PortletBagFactory:112] java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet
java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2527)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1010)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1483)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:109)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:458)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:255)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:103)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:108)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:178)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:37)
at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:102)
at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:37)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:98)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
... 34 more
thumbnail
Puj Z, modifié il y a 13 années.

RE: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Regular Member Publications: 220 Date d'inscription: 14/01/10 Publications récentes
I have the same problem under Windows XP.

Can anyone from lp-team respond, whether it's a bug or not?
Amir H. Moin, modifié il y a 13 années.

RE: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

New Member Publications: 3 Date d'inscription: 27/07/10 Publications récentes
Hi,

I've solved my class loader errors using this tutorial:

(http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How+to+access+the+full+Liferay+API+from+a+portlet+application)

Now, the status of my issue is updateemoticon to:

http://issues.liferay.com/browse/LPS-11003

which is still an open issue!!
thumbnail
Ahmed Hasan, modifié il y a 13 années.

RE: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Expert Publications: 306 Date d'inscription: 13/04/07 Publications récentes
The best way is to create a struts portlet based on apache struts bridge. There is a sample in liferay plugins repository.

One request to liferay core developers. Can you please move the StrutsPortlet.java file to portal-service instead of portal-impl, so that we will not have problem loading this class.

Ahmed Hasan
CTO, mPower Global Inc.
Amir H. Moin, modifié il y a 13 années.

Re: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

New Member Publications: 3 Date d'inscription: 27/07/10 Publications récentes
Ahmed:

Thank you very much indeed. It solved my problem.

For future reference of others:
http://svn.liferay.com/repos/public/plugins/branches/6.0.x/portlets/sample-struts-portlet/

I hope Liferay take care of your suggestion, since it sounds necessary.

[P.S. since the problem with Liferay is not actually resolved, I refused to mentioned 'resolved' in the subject line.]
韓 成林, modifié il y a 9 mois.

RE: Re: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

New Member Publications: 15 Date d'inscription: 21/08/10 Publications récentes
I hope this problem can be resloved as soon as possible.
emoticon
thumbnail
Kien Tran, modifié il y a 13 années.

RE: Re: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Junior Member Publications: 80 Date d'inscription: 24/09/10 Publications récentes
http://svn.liferay.com/repos/public/plugins/branches/6.0.x/portlets/sample-struts-portlet/

I haven't an account on this site. You can send for me.

Thanks you.
thumbnail
Kien Tran, modifié il y a 13 années.

RE: Re: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Junior Member Publications: 80 Date d'inscription: 24/09/10 Publications récentes
How do i register an account on this website?

Thanks in advance,
thumbnail
Simon Gołębiewski, modifié il y a 13 années.

RE: Re: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Regular Member Publications: 246 Date d'inscription: 08/06/09 Publications récentes
Login: guest
without password
thumbnail
vijay pandey, modifié il y a 13 années.

RE: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Junior Member Publications: 44 Date d'inscription: 01/09/10 Publications récentes
hi Ahmed hasan sir,
i am using eclispe and i have done plug in with liferay-plugins-sdk-6.0.5 but when i am going to make a portlet using struts then i face the problem of class not resolved ,Class name is =>(com.liferay.portlet.StrutsPortlet) ....
I has not reconize StrutsPortlet ...

Please Provide me solution

Thanks in advance

vijay pandey
thumbnail
Simon Gołębiewski, modifié il y a 13 années.

RE: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Regular Member Publications: 246 Date d'inscription: 08/06/09 Publications récentes
Ahmed,

I think you should fill this request on liferay JIRA and link to this thread.

Cheers,
Simon
Arun Kumar S, modifié il y a 13 années.

RE: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Regular Member Publications: 182 Date d'inscription: 23/06/08 Publications récentes
thumbnail
Hajri Mohamed, modifié il y a 13 années.

RE: Struts Portlet Deployment Errors in Liferay Portal 6.0.4

Junior Member Publications: 71 Date d'inscription: 02/03/11 Publications récentes
this type of errors are coming from a false package tree, just correct it in struts-config.xml (action mapping) like this (tye = com.liferay.samplestruts.struts.action.(Class name here)), after updating all this, no class def found will not raise and the portlet will work fine