Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
donna arthur
portlets not deployed when Tomcat is not started within Eclipse
November 13, 2012 3:08 AM
Answer

donna arthur

Rank: New Member

Posts: 6

Join Date: August 14, 2012

Recent Posts

Hello all,
I have Liferay CE 6.1 GA1 bundled with Tomcat. In Eclipse I have configured the runtime environment for Tomcat. I developed some portlets using Spring (I have in portlet.xml fo each portlet tag the subtag portlet-class with the value org.springframework.web.portlet.DispatcherPortlet). My issue is that if I start Tomcat within Eclipse the portlets get deployed successfully; if I start Tomcat by running from command prompt 'catalina.sh start' the deployment process stops at message 'Deployment will start in a few seconds' and the portlets are not visible in Liferay.
I enabled logging for the Liferay deploy packages and the logs are attached.
When deploying with Tomcat started within Eclipse, the logs includes these extra lines:

2012/11/12 16:49:48 DEBUG
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:91) [][pool-2-thread-2]
Invoking deploy for MyPortlets
-----
2012/11/12 16:49:48 DEBUG
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:91) [][pool-2-thread-2]
Invoking deploy for MyPortlets
-----
2012/11/12 16:49:48 DEBUG
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.initServiceComponent(PluginPackageHotDeployListener.java:182) [][pool-2-thread-2]
Unable to read service.properties
-----
2012/11/12 16:49:48 DEBUG
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.initServiceComponent(PluginPackageHotDeployListener.java:182) [][pool-2-thread-2]
Unable to read service.properties
-----
2012/11/12 16:49:49 DEBUG
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.reconfigureCaches(PluginPackageHotDeployListener.java:233) [][pool-2-thread-2]
Unable to read portlet.properties
-----
2012/11/12 16:49:49 DEBUG
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.reconfigureCaches(PluginPackageHotDeployListener.java:233) [][pool-2-thread-2]
Unable to read portlet.properties
-----
2012/11/12 16:49:49 INFO
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:127) [][pool-2-thread-2]
Plugin package MyPortlets/MyPortlets/unknown/war registered successfully. It's now ready to be used.
-----
2012/11/12 16:49:49 INFO
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:127) [][pool-2-thread-2]
Plugin package MyPortlets/MyPortlets/unknown/war registered successfully. It's now ready to be used.
-----
2012/11/12 16:49:49 DEBUG
com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:521) [][pool-2-thread-2]
Invoking deploy for MyPortlets
-----
2012/11/12 16:49:49 DEBUG
com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:521) [][pool-2-thread-2]
Invoking deploy for MyPortlets
-----
2012/11/12 16:49:49 DEBUG
com.liferay.portal.deploy.hot.LayoutTemplateHotDeployListener.doInvokeDeploy(LayoutTemplateHotDeployListener.java:72) [][pool-2-thread-2]
Invoking deploy for MyPortlets
-----
2012/11/12 16:49:49 DEBUG
com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:222) [][pool-2-thread-2]
Invoking deploy for MyPortlets
-----
2012/11/12 16:49:49 INFO
com.liferay.portal.deploy.hot.PortletHotDeployListener.logRegistration(PortletHotDeployListener.java:614) [][pool-2-thread-2]
Registering portlets for MyPortlets
-----
2012/11/12 16:49:51 DEBUG
com.liferay.portal.deploy.hot.PortletHotDeployListener.processPortletProperties(PortletHotDeployListener.java:631) [][pool-2-thread-2]
Unable to read portlet.properties
-----
2012/11/12 16:49:51 INFO
com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:438) [][pool-2-thread-2]
11 portlets for MyPortlets are available for use
-----
2012/11/12 16:49:51 DEBUG
com.liferay.portal.deploy.hot.ThemeHotDeployListener.doInvokeDeploy(ThemeHotDeployListener.java:73) [][pool-2-thread-2]
Invoking deploy for MyPortlets
-----
2012/11/12 16:49:51 DEBUG
com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletContextListener.java:109) [][pool-2-thread-2]
Dynamically binding the Liferay data source


Why the methods from packages PluginPackageHotDeployListener, HookHotDeployListener, PortletHotDeployListener are not called when deploying with Tomcat started standalone?

Thank you for your time,
Donna
Attachments: Tomcat-Console.txt (9.8k), Tomcat-Eclipse.txt (16.0k)
Hitoshi Ozawa
RE: portlets not deployed when Tomcat is not started within Eclipse
November 13, 2012 5:35 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Are you deploying from Liferay IDE on both times? If you're manually deploying portlets when tomcat is started manually, are you copying the war file to the "deploy" directory and not to the webapps directory? Liferay adds some files when war file is copied to the "deploy" directory.
David H Nebinger
RE: portlets not deployed when Tomcat is not started within Eclipse
November 13, 2012 5:58 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6694

Join Date: September 1, 2006

Recent Posts

Don't know why running under eclipse would be different, but...

Any plugin that is providing service builder methods (i.e. the project has a service.xml file) must have a service.properties file in the root of the source directory.

Any plugin that has a com.liferay.portal.kernel.servlet.PortletContextListener defined in the projects web.xml file must have a portlet.properties file at the root of the source directory.
donna arthur
RE: portlets not deployed when Tomcat is not started within Eclipse
November 13, 2012 6:42 AM
Answer

donna arthur

Rank: New Member

Posts: 6

Join Date: August 14, 2012

Recent Posts

Hi Hitoshi,
In both cases I'm copying the WAR file to the Liferay deploy directory, not Tomcat's webapps.

David,
No plugin is providing service builder methods. In WEB.xml I do not have any com.liferay.portal.kernel.servlet.PortletContextListener defined, just a org.springframework.web.context.ContextLoaderListener for Spring configuration.

Thank you both for the reply
Hitoshi Ozawa
RE: portlets not deployed when Tomcat is not started within Eclipse
November 13, 2012 1:08 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Are you sure it's the same tomcat being started? Does this happen for all portlet or just the one you've developed?
donna arthur
RE: portlets not deployed when Tomcat is not started within Eclipse
November 14, 2012 5:48 AM
Answer

donna arthur

Rank: New Member

Posts: 6

Join Date: August 14, 2012

Recent Posts

Yes, it's the same Tomcat. This happens only with my developer portlets, the other built-in portlets that come with Liferay are deployed successfully.
donna arthur
RE: portlets not deployed when Tomcat is not started within Eclipse
November 16, 2012 1:15 AM
Answer

donna arthur

Rank: New Member

Posts: 6

Join Date: August 14, 2012

Recent Posts

Hi,
One of my colleague solved it; he created a startup script for Tomcat that uses the same classpath as Eclipse does.

Thank you all for your time,
Donna