Question

We developed one custom workflow and custom portlet in which we apply this flow. But we are facing NullPointerException in this. When i run it first time it was running absolutely fine. I am using Liferay 6.0.6 with Tomcat 6.0.29.

I tried yesterday the same portlet in other machine and its working fine but today in that machine also we are facing the problem.

Here is the whole error log:-

04:39:11,570 ERROR [HotDeployUtil:112] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for DemoCustomWorkflow-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for DemoCustomWorkflow-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:45)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:104)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:109)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:182)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:38)
at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletContextListener.java:99)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:52)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:55)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1244)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1342)
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:636)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.liferay.util.portlet.PortletProps
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:81)
at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:75)
at com.liferay.portlet.PortletBagFactory.getPluginPropertyValue(PortletBagFactory.java:324)
at com.liferay.portlet.PortletBagFactory.newAssetRendererFactoryInstances(PortletBagFactory.java:452)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:196)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:456)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:253)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:101)
... 19 more

If anyone has any idea please kindly help me.

Thanks Laxman Rana

Was it helpful?

Solution

You need to create an EXT for that. You need to override a java file named PortletBagFactory.java. In that file replace getPluginPropertyValue() method with this code:

protected String getPluginPropertyValue(String propertyKey)
    throws Exception
{
    Class<?> clazz = _classLoader.loadClass(PortletProps.class.getName());
    java.lang.reflect.Method method = clazz.getMethod("get", String.class);
    return (String)method.invoke( _getMethodKey, propertyKey);
}

and then "direct-deploy". Also, create a blank file named portlet.properties in your src package of project in which you got this error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top