掲示板

Liferay custom portlet can't be deployed even after reinstall

14年前 に whyBish valid によって更新されました。

Liferay custom portlet can't be deployed even after reinstall

Junior Member 投稿: 63 参加年月日: 09/07/10 最新の投稿
I'm getting null pointer exceptions when liferay is trying to undeploy a custom portlet. I have uninstalled and reinstalled liferay, and I still get the null pointer exception when it tries to undeploy the custom portlet (but it shouldn't have the custom portlet deployed after the reinstall). I've tried looking at the registry, looking for hsqldb script files, and files relative to my user directory, but can't find anything.

Where is it remembering what is deployed?

INFO: Undeploying context [/adam-demo-portlet]
17/09/2009 22:09:33 org.apache.catalina.startup.HostConfig checkResources
WARNING: Error while removing context [/adam-demo-portlet]
java.lang.NullPointerException
	at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.destroy(PortalClassLoaderFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
	at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744)
	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4513)
	at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
	at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1006)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	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:595)
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[etfs] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[adamdemo] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[mode] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[ViewRendererServlet] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[helloworld] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[books] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[exceptions] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[jsp] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[upload] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[default] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[redirect] has not been started
17/09/2009 22:09:33 org.apache.catalina.startup.HostConfig checkResources
WARNING: Error during context [/adam-demo-portlet] destroy
java.lang.NullPointerException
	at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.destroy(PortalClassLoaderFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
	at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744)
	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4513)
	at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1164)
	at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4613)
	at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1012)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	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:595)
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[etfs] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[adamdemo] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[mode] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[ViewRendererServlet] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[helloworld] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[books] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[exceptions] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[jsp] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[upload] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[default] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.ContainerBase stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adam-demo-portlet].[redirect] has not been started
17/09/2009 22:09:33 org.apache.catalina.core.StandardContext preDeregister
SEVERE: error stopping 
java.lang.NullPointerException
	at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.destroy(PortalClassLoaderFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
	at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744)
	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4513)
	at org.apache.catalina.core.StandardContext.preDeregister(StandardContext.java:5273)
	at org.apache.tomcat.util.modeler.BaseModelMBean.preDeregister(BaseModelMBean.java:1130)
	at com.sun.jmx.mbeanserver.BaseMetaDataImpl.preDeregisterInvoker(BaseMetaDataImpl.java:122)
	at com.sun.jmx.mbeanserver.MetaDataImpl.preDeregisterInvoker(MetaDataImpl.java:251)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:377)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:527)
	at org.apache.tomcat.util.modeler.Registry.unregisterComponent(Registry.java:574)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4101)
	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:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	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:595)
17/09/2009 22:09:34 org.apache.catalina.core.NamingContextListener lifecycleEvent
SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only
17/09/2009 22:09:35 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
17/09/2009 22:09:35 org.apache.catalina.core.StandardContext start
SEVERE: Context [/adam-demo-portlet] startup failed due to previous errors
14年前 に whyBish valid によって更新されました。

RE: Liferay custom portlet can't be deployed even after reinstall

Junior Member 投稿: 63 参加年月日: 09/07/10 最新の投稿
Resolved.
Two issues: I was trying to get a custom portlet secured and had included some jars in the portlet that should have just been on the build path.
Secondly, if an undeploy fails because of this then when you redeploy it still tries to deploy old stuff (maybe this is just the Tomcat behaviour?) needed to delete temp/work/webapp folders.
thumbnail
13年前 に Nagendra Kumar Busam によって更新されました。

RE: Liferay custom portlet can't be deployed even after reinstall

Liferay Master 投稿: 678 参加年月日: 09/07/07 最新の投稿
Hi whyBish,

Even i am getting same problem for my custom portlet. I didn't get following statement, can you explain a bit about it

I was trying to get a custom portlet secured and had included some jars in the portlet that should have just been on the build path >> what is this exactly


Is there any other way of avoiding this error. Every time removing those folders its a kind of hectic emoticon

Thanks,
- Nagendra Kumar
thumbnail
13年前 に Shagul Khajamohideen によって更新されました。

RE: Liferay custom portlet can't be deployed even after reinstall

Liferay Master 投稿: 758 参加年月日: 07/09/27 最新の投稿
You could probably override the targets in your portlet's build.xml to tell what to include and exclude.

http://www.liferay.com/community/forums/-/message_boards/message/4534963
13年前 に whyBish valid によって更新されました。

RE: Liferay custom portlet can't be deployed even after reinstall

Junior Member 投稿: 63 参加年月日: 09/07/10 最新の投稿
Some of the jars I was deploying shouldn't have been deployed as they are already available as part of liferay. I can't remember exactly what jars it was, but it was something obviously stupid like servlet.jar or similar.
thumbnail
12年前 に Gerhard Karl によって更新されました。

RE: Liferay custom portlet can't be deployed even after reinstall

New Member 投稿: 10 参加年月日: 11/05/25 最新の投稿
i got the following error at hotdeployment of my portlet:

java.lang.NullPointerException at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.destroy(PortalClassLoaderFilter.java:47)

Solution: <scope>provided</scope> for the following dependency

<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<scope>provided</scope>
</dependency>