PUBLIC - Liferay Portal Community Edition

sample struts liferay portlet doesnot load

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 5.2.3, 6.0.4 GA, 6.0.5 GA
  • Fix Version/s: --Sprint - SP, 6.1.0 CE RC1
  • Component/s: Plugins
  • Labels:
    None
  • Environment:
    tomcat bundled 6.0.26 with liferay 6.0.4
  • Branch Version/s:
    5.2.x, 6.0.x
  • Backported to Branch:
    Committed
  • Similar Issues:
    Show 5 results 

Description

15:58:17,328 INFO [PortletHotDeployListener:222] Registering portlets for sample-struts-liferay-portlet
15:58:17,421 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

Activity

Hide
Puj added a comment -

having the exact same problem on Windows.

Show
Puj added a comment - having the exact same problem on Windows.
Hide
Leon Schaeps added a comment -

We have the same problem

Show
Leon Schaeps added a comment - We have the same problem
Hide
s t added a comment -

I wonder why this one is minor.
Is there a solution or a work-around for this problem?

From what I found it is related to to tomcat 6.0.18 seems to work, 6.0.>18 will not.
How can we develop for liferay if not even the sample portlets provided by liferay are working.
I'm sorry to say this, but this is poor, especially considering the time this issue is open without an official response.

Best regards

Show
s t added a comment - I wonder why this one is minor. Is there a solution or a work-around for this problem? From what I found it is related to to tomcat 6.0.18 seems to work, 6.0.>18 will not. How can we develop for liferay if not even the sample portlets provided by liferay are working. I'm sorry to say this, but this is poor, especially considering the time this issue is open without an official response. Best regards
Hide
Puj added a comment -

I couldn't agree more. This "minor" bug basically made us incapable of using struts.

Show
Puj added a comment - I couldn't agree more. This "minor" bug basically made us incapable of using struts.
Hide
Gavin Wan added a comment -

if you got NoClassDefFoundError: com/liferay/portlet/StrutsPortlet
please copy /META-INF/context.xml to $CATALINA_BASE/conf/[enginename]/[hostname] and rename to sample-struts-liferay-portlet.xml

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
"Only if a context file does not exist for the application in the $CATALINA_BASE/conf/[enginename]/[hostname]/, in an individual file at /META-INF/context.xml inside the application files. If the web application is packaged as a WAR then /META-INF/context.xml will be copied to $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to match the application's context path. Once this file exists, it will not be replaced if a new WAR with a newer /META-INF/context.xml is placed in the host's appBase."

Show
Gavin Wan added a comment - if you got NoClassDefFoundError: com/liferay/portlet/StrutsPortlet please copy /META-INF/context.xml to $CATALINA_BASE/conf/[enginename]/[hostname] and rename to sample-struts-liferay-portlet.xml http://tomcat.apache.org/tomcat-6.0-doc/config/context.html "Only if a context file does not exist for the application in the $CATALINA_BASE/conf/[enginename]/[hostname]/, in an individual file at /META-INF/context.xml inside the application files. If the web application is packaged as a WAR then /META-INF/context.xml will be copied to $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to match the application's context path. Once this file exists, it will not be replaced if a new WAR with a newer /META-INF/context.xml is placed in the host's appBase."
Hide
jun added a comment -

I still have the issue, and my deploy environment is jboss bundled 5.1.0 with liferay 6.0.5.

How to resolve it in jboss?

Show
jun added a comment - I still have the issue, and my deploy environment is jboss bundled 5.1.0 with liferay 6.0.5. How to resolve it in jboss?
Hide
Takeshi TOTANI added a comment -

I also have the same issue on jboss 5.1.0.

I also think this bug is essential,
because this error would be not only failing to read StrutsPorlet but failing to read all the class inside portal-impl.jar.

Show
Takeshi TOTANI added a comment - I also have the same issue on jboss 5.1.0. I also think this bug is essential, because this error would be not only failing to read StrutsPorlet but failing to read all the class inside portal-impl.jar.

People

Vote (2)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: