Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sushil Mayengbam
Could not initialize class com.liferay.util.portlet.PortletProps
January 17, 2013 10:50 AM
Answer

Sushil Mayengbam

Rank: Junior Member

Posts: 53

Join Date: February 16, 2010

Recent Posts

Hi All,

I've got a strange issue today when I deploy (hot) my portlet which was originally working till yesterday.

An exception: "... Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.liferay.util.portlet.PortletProps" is coming at the console screen.
Here is the * partial* stack trace..

17:58:00,328 ERROR [HotDeployImpl:191] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for abc-developer-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for abc-developer-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:123)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
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:39)


Any ideas or solutions is most welcome.

I checked this link - https://www.liferay.com/community/forums/-/message_boards/message/7392646 but not helping me.

Thanks,
Sushil
David H Nebinger
RE: Could not initialize class com.liferay.util.portlet.PortletProps
January 17, 2013 6:52 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 10366

Join Date: September 1, 2006

Recent Posts

Did the util-java.jar file get copied to your plugin's WEB-INF/lib during deployment?

Do you have the portlet.properties file in your plugins WEB-INF/src directory?
Sushil Mayengbam
RE: Could not initialize class com.liferay.util.portlet.PortletProps
January 17, 2013 10:01 PM
Answer

Sushil Mayengbam

Rank: Junior Member

Posts: 53

Join Date: February 16, 2010

Recent Posts

Hi David,

Thanks for the reply. FYI, I already put the util-java.jar in the WEB-INF/lib and my portlet.properties is in /WEB-INF/src/resource folder.
It was working earlier. One thing I observed in the log is:

05:32:09,447 INFO [PortletBagFactory:408] Attempting to load content/Language.properties
05:32:09,462 INFO [PortletBagFactory:408] Attempting to load content/Language_en_US.properties
05:32:09,462 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties
05:32:09,462 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language_en_US.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties05:32:09,447 INFO [PortletBagFactory:408] Attempting to load content/Language.properties
05:32:09,462 INFO [PortletBagFactory:408] Attempting to load content/Language_en_US.properties
05:32:09,462 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties
05:32:09,462 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language_en_US.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties
05:32:09,541 INFO [PortletBagFactory:408] Attempting to load content/Language_en.properties


I'm not sure if this is something to do with the current issue.

Thanks,
Sushil
Sushil Mayengbam
RE: Could not initialize class com.liferay.util.portlet.PortletProps
January 18, 2013 1:33 AM
Answer

Sushil Mayengbam

Rank: Junior Member

Posts: 53

Join Date: February 16, 2010

Recent Posts

I found the issue. Seems, there's a problem with the web.xml. I replaced the one with the earlier one and now it's working.
Strange enough that Liferay is not giving me the hint to the correct context.


Thanks David once again for your time.

Regards,
Sushil
Luigi Candita
RE: Could not initialize class com.liferay.util.portlet.PortletProps
February 7, 2013 7:42 AM
Answer

Luigi Candita

Rank: Junior Member

Posts: 27

Join Date: May 4, 2009

Recent Posts

Sushil Mayengbam:

Strange enough that Liferay is not giving me the hint to the correct context.



Yeah.. really strange! emoticon