0

My issue si very onclear, as i'm copying and pasting a project which works in liferay (a test portlet), i'm renaming the portlet in the various files needed and i'm trying to deploy it. It Throws a NullPointer and i cannot really see why. Below is the error:

GRAVE: Exception sending context destroyed event to listener instance of class com.liferay.portal.kernel.servlet.SecurePluginContextListener
java.lang.ExceptionInInitializerError
    at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.initDependentServletContextNames(HotDeployEvent.java:97)
    at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.<init>(HotDeployEvent.java:53)
    at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:170)
    at com.liferay.portal.kernel.servlet.SecurePluginContextListener.fireUndeployEvent(SecurePluginContextListener.java:294)
    at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
    at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5063)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5723)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
    at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1547)
    at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1453)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1695)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:333)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at com.liferay.portal.kernel.util.PropsUtil.get(PropsUtil.java:32)
    at com.liferay.portal.kernel.deploy.hot.DependencyManagementThreadLocal.<clinit>(DependencyManagementThreadLocal.java:40)
    ... 22 more

I'am deploying through the deploy directory of liferay's tomcat.

This is not a question about nullpointer exception but on portlet deployment in liferay.

softwareplay
  • 1,379
  • 4
  • 28
  • 64
  • Possible duplicate of [What is a NullPointerException, and how do I fix it?](http://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) – Sanjeev Jun 21 '16 at 10:15
  • I know what a null pointer is, i just cannot get why it's thrown in this context... – softwareplay Jun 21 '16 at 10:22
  • For that you need to go to `PropsUtil.java` and see what is there on `line 32` that is causing a NPE – Sanjeev Jun 21 '16 at 10:24
  • What version of liferay is this?! I cant find the line `(DependencyManagementThreadLocal.java:40)` – KlajdPaja Jun 21 '16 at 10:27
  • It is liferay portal 6.2 – softwareplay Jun 21 '16 at 10:29
  • Did you see that the exception is thrown during _undeployment_? I'd guess that there was an exception during deployment, and because this has not finished successfully the undeployment fails as well... – Tobias Liefke Jun 23 '16 at 20:31

1 Answers1

0

It's likely a Portlet configuration prolem since you renamed the Portlet files. Can you give us the content of Portlet.xml and Liferay-portlet.xml please ?

Radouane ROUFID
  • 10,595
  • 9
  • 42
  • 80