Foros de discusión

Tomcat unregisters portlet, but does not undeploy

K B, modificado hace 13 años.

Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 17 Fecha de incorporación: 19/04/11 Mensajes recientes
Hi,

I'm facing a peculiar problem where the Tomcat server unregisters my portlets on hot deploy, but does not undeploy it, making the portlets unusable when rebuilt. Is there a setting that I have messed up somehow, as it happens just out of the blue.

Thanks!
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
How did you unregister your portlet? Please provide steps you've done and error messages.
K B, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 17 Fecha de incorporación: 19/04/11 Mensajes recientes
Hitoshi Ozawa:
How did you unregister your portlet? Please provide steps you've done and error messages.


Hot deploy does everything. I used the default liferay package with tomcat, and everything default, apart from the portal-ext.properties, which contains:


#
# MySQL 
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal_2?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=pass
schema.run.enabled=true
schema.run.minimal=true
captcha.max.challenges=-1

include-and-override=portal-${easyconf:companyId}.properties
include-and-override=${liferay.home}/portal-${easyconf:companyId}.properties
#set this to make the user private layouts not visible
layout.user.private.layouts.enabled=false
layout.user.public.layouts.enabled=false
layout.user.private.layouts.auto.create=false
layout.user.public.layouts.auto.create=false


When I save a file, hot deploy does its job. Below is the log:

Apr 19, 2011 11:26:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory tunnel-web
Apr 19, 2011 11:26:08 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-9090
Apr 19, 2011 11:26:08 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 19, 2011 11:26:08 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/76  config=null
Apr 19, 2011 11:26:08 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 92094 ms
Apr 19, 2011 11:31:30 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/myLayout-layouttpl]
11:31:30,742 INFO  [ExtHotDeployListener:205] Extension environment for myLayout-layouttpl will not be undeployed
11:31:30,743 INFO  [LayoutTemplateHotDeployListener:120] Unregistering layout templates for myLayout-layouttpl
11:31:30,745 INFO  [LayoutTemplateHotDeployListener:149] 3 layout templates for myLayout-layouttpl was unregistered
Apr 19, 2011 11:31:30 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/myHome-theme]
11:31:30,981 INFO  [ExtHotDeployListener:205] Extension environment for myHome-theme will not be undeployed
11:31:30,982 INFO  [ThemeHotDeployListener:114] Unregistering themes for myHome-theme
11:31:30,984 INFO  [ThemeHotDeployListener:146] 1 theme for myHome-theme was unregistered
Apr 19, 2011 11:31:31 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/myDockbarHook-hook]
11:31:31,087 INFO  [ExtHotDeployListener:205] Extension environment for myDockbarHook-hook will not be undeployed
11:31:31,305 INFO  [HookHotDeployListener:742] Hook for myDockbarHook-hook was unregistered
Apr 19, 2011 11:31:31 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/myInternal-theme]
11:31:31,400 INFO  [ExtHotDeployListener:205] Extension environment for myInternal-theme will not be undeployed
11:31:31,401 INFO  [ThemeHotDeployListener:114] Unregistering themes for myInternal-theme
11:31:31,402 INFO  [ThemeHotDeployListener:146] 1 theme for myInternal-theme was unregistered
Apr 19, 2011 11:31:31 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/my-portlet]
11:31:31,529 INFO  [ExtHotDeployListener:205] Extension environment for my-portlet will not be undeployed
11:31:31,529 INFO  [PortletHotDeployListener:404] Unregistering portlets for my-portlet
11:31:31,545 INFO  [PortletHotDeployListener:440] 6 portlets for my-portlet was unregistered
11:31:31,550 WARN  [PortletContextListener:91] Unable to dynamically unbind the Liferay data source: Name java_liferay:jdbc is not bound in this Context
Apr 19, 2011 11:31:31 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/myBase-portlet]
11:31:31,943 INFO  [ExtHotDeployListener:205] Extension environment for myBase-portlet will not be undeployed
11:31:31,948 WARN  [PortletContextListener:91] Unable to dynamically unbind the Liferay data source: Name java_liferay:jdbc is not bound in this Context


It was all working so great until Sunday, when things simply went weird.

Thanks!
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
I'm sorry but I'm still not getting you.
You've put a war file into %Liferay Home%\deploy folder and Tomcat is deploying it.

I'm not sure why it's unregistering and suppose to be undeploying.
K B, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 17 Fecha de incorporación: 19/04/11 Mensajes recientes
Hitoshi Ozawa:
I'm sorry but I'm still not getting you.
You've put a war file into %Liferay Home%\deploy folder and Tomcat is deploying it.

I'm not sure why it's unregistering and suppose to be undeploying.

Pardon me...I think I've missed out a crucial point (which I thought I have typed :grinemoticon.

I am using Liferay IDE with Eclipse plugin. Upon saving a file, Tomcat does its sweet thing hot deploying the portlets, but that is when I get the message that the portlets are unregistered, but not undeployed as pointed out in the previous error log.

Thanks!
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
I am using Liferay IDE with Eclipse plugin. Upon saving a file, Tomcat does its sweet thing hot deploying the portlets, but that is when I get the message that the portlets are unregistered, but not undeployed as pointed out in the previous error log
.

My mistake. This was the IDE forum. emoticon

Did you create a ext environment? Are you using Liferay 5.x?

•Multiple deploys (redeployment) now works as expected from IDE, note that auto-matic publishing for Ext plugins is not enabled. It requires manually invoking a publish for Ext plugins. Other projects (portlets, hooks) are still automatically published.


Have you tried Clean app server?
Clean app server action is invokved as a context menu action from Ext plugin project
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
The best thing to do is clear out tomcat state for deployments when it gets in this state where deployment does not work as expected.
  • Stop tomcat server
  • remove all projects that have been deployed to tomcat-6.0.29/webapps
  • Remove all project xml files in the tomcat-6.0.29/conf/Catalina/localhost directory (be sure and leave the ROOT.xml)
  • Remove any XML files in the auto-deploy directory /tomcat-6.0.29/../deploy/
  • Restart Tomcat (this will republish the projects to webapps)


THen things should be working again as expected.
K B, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 17 Fecha de incorporación: 19/04/11 Mensajes recientes
Gregory Amerson:
The best thing to do is clear out tomcat state for deployments when it gets in this state where deployment does not work as expected.
  • Stop tomcat server
  • remove all projects that have been deployed to tomcat-6.0.29/webapps
  • Remove all project xml files in the tomcat-6.0.29/conf/Catalina/localhost directory (be sure and leave the ROOT.xml)
  • Remove any XML files in the auto-deploy directory /tomcat-6.0.29/../deploy/
  • Restart Tomcat (this will republish the projects to webapps)


THen things should be working again as expected.


Tried this "trick" almost a million times now, I can do it with my eyes shut. Suffice to say it's not working. I've tried removing one portlet at a time, and still no joy. Could it be the database that is somehow corrupted?

I've tried a clean Eclipse install with LR SDK, and shiny new server. Funny thing is it was working just fine up until a couple of days ago, and nothing's changed on my computer (no new software/hardware/network dramas).

Thanks for your help and advise!
K B, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 17 Fecha de incorporación: 19/04/11 Mensajes recientes
Found someone with similar symptoms, although I don't like the resolution...
http://stackoverflow.com/questions/5559664/after-running-liferay-tomcat-combination-through-eclipse-why-does-publishing-fai

Maybe someone from Liferay can shed a bit more light (pardon the pun).

Thanks!
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Maybe someone from Liferay can shed a bit more light (pardon the pun).


K.B., Gregory is the developer behind Liferay IDE. If he can't help you, there's nobody who can.

How about just restarting from reinstalling eclipse and just deploy your portlet to the new eclipse?

OR

Try cleaning and deploying from the command line. I personally found command line to be more stable. Nevertheless, I still use IDE during code development because it's easier to enter codes. emoticon
K B, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 17 Fecha de incorporación: 19/04/11 Mensajes recientes
Hitoshi Ozawa:
Maybe someone from Liferay can shed a bit more light (pardon the pun).


K.B., Gregory is the developer behind Liferay IDE. If he can't help you, there's nobody who can.

How about just restarting from reinstalling eclipse and just deploy your portlet to the new eclipse?

OR

Try cleaning and deploying from the command line. I personally found command line to be more stable. Nevertheless, I still use IDE during code development because it's easier to enter codes. emoticon


Hmmm...I've done just that; reinstall everything from scratch this morning, but it's not helping. I still get the same unregistered, but not undeployed.

My resolution now is to simply start my project over, and copy/paste painfully what I've done for the last month. Not the best outcome, but you know what they say about beggars and choosers and such. Got no choice but to bite down real hard and power through.

Thanks!
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
If you aren't able to get it working the only next step is to somehow help me replicate the issue on my side which I would likely need copies of the projects that are causing the problem. let me know if I can help out in that way.
K B, modificado hace 13 años.

RE: Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 17 Fecha de incorporación: 19/04/11 Mensajes recientes
Gregory Amerson:
If you aren't able to get it working the only next step is to somehow help me replicate the issue on my side which I would likely need copies of the projects that are causing the problem. let me know if I can help out in that way.


I've managed to fix it by recreating the whole project, and copy/paste the files one at a time. I just cross my fingers it won't happen again. Seems to me like the db is the culprit; somehow got corrupted during development.

Thanks!
Kristian Gil, modificado hace 10 años.

RE: Tomcat unregisters portlet, but does not undeploy

New Member Mensajes: 22 Fecha de incorporación: 14/07/10 Mensajes recientes
Hi Gregory,

I was developing a Hook to override some of the Blogs core functionality (it didn't work since it seems I had to use some of the portal-impl.jar code). So then I proceeded undeploying my Hook but now core Blogs doesn't seem to work properly so it seems something just got corrupted emoticon
I've tried your the steps you provided and also cleared "temp" and "work" folders (under liferay-portal-6.1.20-ee-ga2/tomcat-7.0.27) but it's not working.
Do you have any input of how I can restore Blogs portlet to its default state?
I can see the jsp's I had overriden are back to normal. Could it be possible that my portal-service.jar or portal-impl.jar are not right, or maybe something in our DB?

Your help is greatly appreciated!
Kristian

Gregory Amerson:
The best thing to do is clear out tomcat state for deployments when it gets in this state where deployment does not work as expected.
  • Stop tomcat server
  • remove all projects that have been deployed to tomcat-6.0.29/webapps
  • Remove all project xml files in the tomcat-6.0.29/conf/Catalina/localhost directory (be sure and leave the ROOT.xml)
  • Remove any XML files in the auto-deploy directory /tomcat-6.0.29/../deploy/
  • Restart Tomcat (this will republish the projects to webapps)


THen things should be working again as expected.