(ExceptionInInitializerError) 将上下文销毁事件发送到 class PluginContextListener 的侦听器实例时发生异常

(ExceptionInInitializerError) Exception sending context destroyed event to listener instance of class PluginContextListener

我已经创建了一个 portlet,我正在尝试进行部署,但是在进行部署时,出现以下错误,

注意:我使用的是liferay-plugins-sdk-6.2-ce-ga6

请帮帮我。

SEVERE: Exception sending context destroyed event to listener instance of class com.liferay.portal.kernel.servlet.PluginContextListener
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.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:4980)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5626)
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.deleteRedeployResources(HostConfig.java:1299)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1439)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
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:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:744)
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)
... 21 more

May 27, 2016 2:21:54 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/Sample-portlet] created a ThreadLocal with key of type [com.liferay.portal.kernel.util.CentralizedThreadLocal.ThreadLocalMapThreadLocal] (value [com.liferay.portal.kernel.util.CentralizedThreadLocal$ThreadLocalMapThreadLocal@32b11adf]) and a value of type [com.liferay.portal.kernel.util.CentralizedThreadLocal.ThreadLocalMap] (value [com.liferay.portal.kernel.util.CentralizedThreadLocal$ThreadLocalMap@95b4079]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

谷歌搜索一段时间后,我发现这种类型的错误有时会在您复制 portal-service.jar 时出现,因此请确保您的 pom 中的这种密度设置为 provided