组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
donna arthur
portlets not deployed when Tomcat is not started within Eclipse
2012年11月13日 上午3:08
答复

donna arthur

等级: New Member

帖子: 6

加入日期: 2012年8月14日

最近的帖子

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
附件: Tomcat-Console.txt (9.8k), Tomcat-Eclipse.txt (16.0k)
Hitoshi Ozawa
RE: portlets not deployed when Tomcat is not started within Eclipse
2012年11月13日 上午5:35
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 7949

加入日期: 2010年3月23日

最近的帖子

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
2012年11月13日 上午5:58
答复

David H Nebinger

Community Moderator

等级: Liferay Legend

帖子: 12525

加入日期: 2006年9月1日

最近的帖子

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
2012年11月13日 上午6:42
答复

donna arthur

等级: New Member

帖子: 6

加入日期: 2012年8月14日

最近的帖子

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
2012年11月13日 下午1:08
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 7949

加入日期: 2010年3月23日

最近的帖子

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
2012年11月14日 上午5:48
答复

donna arthur

等级: New Member

帖子: 6

加入日期: 2012年8月14日

最近的帖子

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
2012年11月16日 上午1:15
答复

donna arthur

等级: New Member

帖子: 6

加入日期: 2012年8月14日

最近的帖子

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