sample-struts-liferay-portlet included in plugin SDK 5.1.2 DOESN'T work on web space server 10

classic Classic list List threaded Threaded
6 messages Options
hechoUnRopaSuelta hechoUnRopaSuelta
Reply | Threaded
Open this post in threaded view
|

sample-struts-liferay-portlet included in plugin SDK 5.1.2 DOESN'T work on web space server 10

Hi there!, I´ve been testing my new Sun Web Space Server 10 environment, and i had a big trouble. I was deploying some portlets form the latest plugin-SDK portlets (version 5.1.2). I had big troubles with struts portlets.I deployed sucessfully the sample-struts-portlet, but i wasn´t able to deploy sample-struts-liferay-portlet. The portlet sample-struts-liferay-portlet cannot be instantiated by the portlet due to: java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet The portlet sample-struts-portlet uses the struts bridges class as portlet class, so it deploys ok. I have several portlets (made in liferay 5.0.1) whose portlet class is StrutsPortlet, and i want to deploy them in this new environment, without doing many code changes. ¿what´s wrong here? This portlet MUST be able to be deployed in the system.I dont want to make code refactoring to my portlets with struts bridges nor creating them again with other artifacts like Portal Pack. There ´s something wrong here. I´ve also tried to include portal-impl.jar (which includes StrutsPortlet.class) in the portlet /lib directory but it also gives me an exception: java.lang.ClassCastException: com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl cannot be cast to com.liferay.portlet.PortletContextImpl This is the complete error trace (without including portal-impl.jar). I mean, performing the task in the correct way. ADM1041:Sent the event to instance:[ModuleDeployEvent -- enable web/sample-struts-liferay-portlet] 2009-03-05 18:13:59,342 [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner] INFO com.liferay.portal.deploy.auto.PortletAutoDeployListener - Portlets for C:\proyectos\webspace_bundled_liferay\var\webspace\deploy\sample-struts-liferay-portlet-5.1.2.1.war copied successfully. Deployment will start in a few seconds. 2009-03-05 18:13:59,860 [httpWorkerThread-4848-0] INFO com.liferay.portal.deploy.hot.PortletHotDeployListener - Registering portlets for sample-struts-liferay-portlet 2009-03-05 18:13:59,998 [httpWorkerThread-4848-0] INFO com.liferay.portal.deploy.hot.PortletHotDeployListener - 1 portlets for sample-struts-liferay-portlet are ready for registration WebModule[/sample-struts-liferay-portlet]PWC1275: Exception sending context initialized event to listener instance of class com.liferay.portal.kernel.servlet.PortletContextListener java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:983) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501) at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:374) at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:248) at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:121) at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:84) at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:41) at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:113) at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:48) at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:109) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4632) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5312) at com.sun.enterprise.web.WebModule.start(WebModule.java:353) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627) at com.sun.enterprise.web.WebContainer.enableWebModule(WebContainer.java:2148) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleEnabled(WebModuleDeployEventListener.java:391) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1011) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:1901) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1968) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364) at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) at $Proxy1.invoke(Unknown Source) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69) at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155) at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122) at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116) Caused by: java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1576) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 77 more PWC1306: Startup of context /sample-struts-liferay-portlet failed due to previous errors Thanks in advance to everyone for reading this post.
hechoUnRopaSuelta hechoUnRopaSuelta
Reply | Threaded
Open this post in threaded view
|

Re: sample-struts-liferay-portlet included in plugin SDK 5.1.2 DOESN'T work on web space server 10

<p>
Sorry, bad format
</p>

hechoUnRopaSuelta wrote
<p>
Hi there!,
</p>


I´ve been testing my new Sun Web Space Server 10 environment, and i had a big trouble.
</p>

I was deploying some portlets form the latest plugin-SDK portlets (version 5.1.2).
I had big troubles with struts portlets.I deployed sucessfully the sample-struts-portlet,
but i wasn´t able to deploy sample-struts-liferay-portlet.
</p>

<p>
The portlet sample-struts-liferay-portlet cannot be instantiated by the portlet due to:
java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet
</p>

<p>
The portlet sample-struts-portlet uses the struts bridges class as portlet class, so it deploys ok.
I have several portlets (made in liferay 5.0.1) whose portlet class is StrutsPortlet, and i want to deploy them in this
new environment, without doing many code changes. ¿what´s wrong here? This portlet MUST be able to be deployed in
the system.I dont want to make code refactoring to my portlets with struts bridges nor creating them again with
other artifacts like Portal Pack.
</p>

<p>
There ´s something wrong here.  I´ve also tried to include portal-impl.jar (which includes StrutsPortlet.class) in
the portlet /lib directory but it also gives me an exception:
java.lang.ClassCastException: com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl cannot be cast to com.liferay.portlet.PortletContextImpl
</p>

<p>
This is the complete error trace (without including portal-impl.jar). I mean, performing the task in the correct way.
</p>

<p>

ADM1041:Sent the event to instance:[ModuleDeployEvent -- enable web/sample-struts-liferay-portlet]
2009-03-05 18:13:59,342 [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner] INFO  com.liferay.portal.deploy.auto.PortletAutoDeployListener - Portlets for C:\proyectos\webspace_bundled_liferay\var\webspace\deploy\sample-struts-liferay-portlet-5.1.2.1.war copied successfully. Deployment will start in a few seconds.
2009-03-05 18:13:59,860 [httpWorkerThread-4848-0] INFO  com.liferay.portal.deploy.hot.PortletHotDeployListener - Registering portlets for sample-struts-liferay-portlet
2009-03-05 18:13:59,998 [httpWorkerThread-4848-0] INFO  com.liferay.portal.deploy.hot.PortletHotDeployListener - 1 portlets for sample-struts-liferay-portlet are ready for registration
WebModule[/sample-struts-liferay-portlet]PWC1275: Exception sending context initialized event to listener instance of class com.liferay.portal.kernel.servlet.PortletContextListener
java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:983)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:374)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:248)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:121)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:84)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:41)
        at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:113)
        at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:48)
        at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:109)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4632)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5312)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:353)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627)
        at com.sun.enterprise.web.WebContainer.enableWebModule(WebContainer.java:2148)
        at com.sun.enterprise.server.WebModuleDeployEventListener.moduleEnabled(WebModuleDeployEventListener.java:391)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1011)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:1901)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1968)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
        at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
        at $Proxy1.invoke(Unknown Source)
        at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
        at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
        at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
        at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
        at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
        at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Caused by: java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1576)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 77 more
PWC1306: Startup of context /sample-struts-liferay-portlet failed due to previous errors

Thanks in advance to everyone for reading this post.
</p>
Deepak Gothe Deepak Gothe
Reply | Threaded
Open this post in threaded view
|

Re: sample-struts-liferay-portlet included in plugin SDK 5.1.2 DOESN'T work on web space server 10

In reply to this post by hechoUnRopaSuelta

hechoUnRopaSuelta wrote
Hi there!,

I´ve been testing my new Sun Web Space Server 10 environment, and i had a big trouble.

I was deploying some portlets form the latest plugin-SDK portlets (version 5.1.2). I had big troubles with struts portlets.I deployed sucessfully the sample-struts-portlet, but i wasn´t able to deploy sample-struts-liferay-portlet.

The portlet sample-struts-liferay-portlet cannot be instantiated by the portlet due to:
java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet

The portlet sample-struts-portlet uses the struts bridges class as portlet class, so it deploys ok.
I have several portlets (made in liferay 5.0.1) whose portlet class is StrutsPortlet, and i want to deploy them in this new environment, without doing many code changes. ¿what´s wrong here? This portlet MUST be able to be deployed in the system.I dont want to make code refactoring to my portlets with struts bridges nor creating them again with other artifacts like Portal Pack.

There ´s something wrong here.  I´ve also tried to include portal-impl.jar (which includes StrutsPortlet.class) in the portlet /lib directory but it also gives me an exception:
java.lang.ClassCastException: com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl cannot be cast to com.liferay.portlet.PortletContextImpl

This is the complete error trace (without including portal-impl.jar). I mean, performing the task in the correct way.

ADM1041:Sent the event to instance:[ModuleDeployEvent -- enable web/sample-struts-liferay-portlet]
2009-03-05 18:13:59,342 [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner] INFO  com.liferay.portal.deploy.auto.PortletAutoDeployListener - Portlets for C:\proyectos\webspace_bundled_liferay\var\webspace\deploy\sample-struts-liferay-portlet-5.1.2.1.war copied successfully. Deployment will start in a few seconds.
2009-03-05 18:13:59,860 [httpWorkerThread-4848-0] INFO  com.liferay.portal.deploy.hot.PortletHotDeployListener - Registering portlets for sample-struts-liferay-portlet
2009-03-05 18:13:59,998 [httpWorkerThread-4848-0] INFO  com.liferay.portal.deploy.hot.PortletHotDeployListener - 1 portlets for sample-struts-liferay-portlet are ready for registration
WebModule[/sample-struts-liferay-portlet]PWC1275: Exception sending context initialized event to listener instance of class com.liferay.portal.kernel.servlet.PortletContextListener
java.lang.NoClassDefFoundError: com/liferay/portlet/StrutsPortlet
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:983)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:374)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:248)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:121)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:84)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:41)
        at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:113)
        at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:48)
        at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:109)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4632)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5312)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:353)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627)
        at com.sun.enterprise.web.WebContainer.enableWebModule(WebContainer.java:2148)
        at com.sun.enterprise.server.WebModuleDeployEventListener.moduleEnabled(WebModuleDeployEventListener.java:391)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1011)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:1901)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1968)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
        at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
        at $Proxy1.invoke(Unknown Source)
        at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
        at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
        at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
        at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
        at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
        at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Caused by: java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1576)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 77 more
PWC1306: Startup of context /sample-struts-liferay-portlet failed due to previous errors

Thanks in advance to everyone for reading this post.
Deepak Gothe Deepak Gothe
Reply | Threaded
Open this post in threaded view
|

Re: sample-struts-liferay-portlet included in plugin SDK 5.1.2 DOESN'T work on web space server 10

Ignore my previous mail..

NoClassDefFoundError: com/liferay/portlet/StrutsPortlet is thrown is because this file is part of webspace webapp and not "seen" by sample-struts-liferay-portlet webapp. The sample-struts-liferay-portlet works only on Tomcat because Tomcat supports switching the webapp classloader. This handled by <Loader> entry in context.xml where in Portal's classloader is mentioned. So in case of Tomcat, Portal's classloader is used to load sample-struts-liferay-portlet so it "sees" com/liferay/portlet/StrutsPortlet. It will not work in GlassFish, as GlassFish does not provide a way to switch webapp classloader.

In Summary..The sample-struts-liferay-portlet by default (i.e without code changes), will work only on Tomcat, since it uses Tomcat specific feature. It will not work on GlassFish and probably is also not portable with all other appservers as well. This is because the <Loader> entry in context.xml is only supported by Tomcat and GlassFish doesn't provide a way to switch the webapp classloader.

Regards,
Deepak
hechoUnRopaSuelta hechoUnRopaSuelta
Reply | Threaded
Open this post in threaded view
|

Re: sample-struts-liferay-portlet included in plugin SDK 5.1.2 DOESN'T work on web space server 10


<quote author="hechoUnRopaSuelta">
<p>
Hi Deepak!
</p>

<p>
Thank you so much for your quick&great reply.
</p>

<p>
I´ve understood the problem´s cause, but still i want to develop
portlets based on StrutsPortlet class and Glassfish Web Space Server environment.
</p>

<p>
Maybe you can provide me a solution to this trouble, (thanks in advance), and also
to evaluate other alternative approaches.
</p>

<p>
I have other possible solutions, some of them might be wrong due to
Glassfish Web Space Server specifications, please keep in mind that i´ve
been developing in Liferay Portal, and i´m not completely used to
Glassfish Web Space Server environment, so....... must i?:
</p>

<p>
0- Is it possible to configure the environment to deploy&run the portlet, how?
<br>
1- Use Struts Brigdes class as portlet class or other class extending GenericPortlet class [please type it].
<br>
2- Develop portlets with PortalPack
<br>
3- Develop portlets in Liferay ext-environment way.
<br>
4- [Another solution? ]
</p>

<p>
Regards,
Thank you again, Deepak.
</p>
Deepak Gothe Deepak Gothe
Reply | Threaded
Open this post in threaded view
|

Re: sample-struts-liferay-portlet included in plugin SDK 5.1.2 DOESN'T work on web space server 10

You can configure the environment to deploy &r un the portlet. You can use Netbeans Portal Pack to create and deploy portlets to GlassFish Web Space server.

If you want to create Struts based portlets you can use Apache Struts Bridge(see sample-struts-portlet). Check sample-jsf-1.2-sun-facelets-portlet if you want to create JSF based portlets and sample-icefaces-jsf-1.2-sun-facelets-portlet for ICEFaces based portlet.

Regards,
Deepak