Fórum

portlets not deployed when Tomcat is not started within Eclipse

donna arthur, modificado 11 Anos atrás.

portlets not deployed when Tomcat is not started within Eclipse

New Member Postagens: 6 Data de Entrada: 14/08/12 Postagens Recentes
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
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: portlets not deployed when Tomcat is not started within Eclipse

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
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.
donna arthur, modificado 11 Anos atrás.

RE: portlets not deployed when Tomcat is not started within Eclipse

New Member Postagens: 6 Data de Entrada: 14/08/12 Postagens Recentes
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
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: portlets not deployed when Tomcat is not started within Eclipse

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
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, modificado 11 Anos atrás.

RE: portlets not deployed when Tomcat is not started within Eclipse

New Member Postagens: 6 Data de Entrada: 14/08/12 Postagens Recentes
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, modificado 11 Anos atrás.

RE: portlets not deployed when Tomcat is not started within Eclipse

New Member Postagens: 6 Data de Entrada: 14/08/12 Postagens Recentes
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
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: portlets not deployed when Tomcat is not started within Eclipse

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
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.