Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Julien HENRY
Spring portlet cannot be deployed
February 5, 2007 8:24 AM
Answer

Julien HENRY

Rank: New Member

Posts: 4

Join Date: October 25, 2006

Recent Posts

Hi guys,

I'm trying to develop a Spring (2.0.2) portlet. When I try to deploy it in Liferay, I get the following error :

 116:06:06,459 INFO  [HotDeployPortletListener:129] Registering portlets for researchProduct
 216:06:06,475 ERROR [PortletLocalServiceImpl:302] Portlet with the name RKPresearchProduct_WAR_researchProduct is described in portlet.xml but does not have a matching entry in liferay-portlet.xml
 316:06:06,631 ERROR [HotDeployUtil:52] com.liferay.portal.kernel.deploy.HotDeployException: Error registering portlets for researchProduct
 4    at com.liferay.portal.deploy.HotDeployPortletListener.invokeDeploy(HotDeployPortletListener.java:348)
 5    at com.liferay.portal.kernel.deploy.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:86)
 6    at com.liferay.portal.kernel.deploy.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:43)
 7    at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:41)
 8    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
 9    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
10    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
11    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
12    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
13    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
14    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
15    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
16    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1190)
17    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
18    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
19    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
20    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
21    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
22    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
23    at java.lang.Thread.run(Thread.java:619)

And the most "interesting" message:
1Caused by: java.lang.ClassCastException: org.springframework.web.portlet.DispatcherPortlet cannot be cast to javax.portlet.Portlet
2    at com.liferay.portal.deploy.HotDeployPortletListener.invokeDeploy(HotDeployPortletListener.java:154)
3    ... 19 more


I don't understand why org.springframework.web.portlet.DispatcherPortlet cannot be cast to javax.portlet.Portlet...

Any idea ?
Elisabeth VanSchaardenburg
RE: Spring portlet cannot be deployed
February 5, 2007 9:05 AM
Answer

Elisabeth VanSchaardenburg

Rank: Regular Member

Posts: 184

Join Date: May 23, 2006

Recent Posts

Starting with the initial error - do you have an entry for your portlet in the liferay-portlet.xml file?

If you're deploying a portlet into Liferay, you're going to need portlet.xml, liferay-portlet.xml and liferay-display.xml in your WEB-INF directory.

portlet.xml is your standard JSR-168 portlet.xml file. liferay-portlet.xml has some extra settings specific to Liferay. liferay-display.xml is used for adding the portlet to the selection list.


Afraid I'm not sure about the class cast error - at first glance it does seem a little odd.
Jorge Ferrer
RE: Spring portlet cannot be deployed
February 5, 2007 10:04 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2768

Join Date: August 31, 2006

Recent Posts

Another clue: are you deploying your own portlet.jar inside your portlet? If so, don't do it, the portal already has his own and by including yours you suffer a classloaders conflict.
Julien HENRY
RE: Spring portlet cannot be deployed
February 6, 2007 7:08 AM
Answer

Julien HENRY

Rank: New Member

Posts: 4

Join Date: October 25, 2006

Recent Posts

Thank you very much for your help !

I was packaging portlet.jar in my WAR. Now it works !

FYI : liferay-portlet.xml is not required ;)
zaheer mohammed saddapalli
RE: Spring portlet cannot be deployed
June 23, 2010 3:04 AM
Answer

zaheer mohammed saddapalli

Rank: Regular Member

Posts: 164

Join Date: January 15, 2008

Recent Posts

Dear Community,

This post was very helpful for me.

I was working hard to resolve this issue while Integrating Pentaho.

With Regards,
SMDZ