留言板

How to undeploy a portlet?

Maxi Ng,修改在16 年前。

How to undeploy a portlet?

Junior Member 帖子: 44 加入日期: 08-1-8 最近的帖子
I know there is a way to undeploy.
1. close added application
2. turn off liferay
3. delete the .war in server\default\deploy
4. remove the reference to the Portlets in the PortletPreferences table.

But I have some questions.
1. is this the way that Liferay recommand to undeploy?
2. is it safe?
3. is it the only way to undeploy?
4. if I am not using an external database, how can I delete the reference?

Does anyone knows?
Thank you for the reply.
Ricardo Uhalde,修改在16 年前。

RE: How to undeploy a portlet?

New Member 帖子: 9 加入日期: 07-9-20 最近的帖子
If you use Tomcat, you need to delete also unpacked WAR folder in %tomcat-root%\WEBAPPS.

For instance, if your deployed a TEST1.WAR, folder would be like %tomcat-root%\WEBAPPS\TEST1
thumbnail
Michael Saechang,修改在16 年前。

RE: How to undeploy a portlet?

Liferay Master 帖子: 576 加入日期: 07-11-19 最近的帖子
Hey Maxi,

You could also uninstall portlets through the Update Manager. Another way if you're using tomcat is to delete the folder the portlet is in in wepapps while tomcat is running and it should unregister the portlet.

hope this helps

-mike
Maxi Ng,修改在16 年前。

RE: How to undeploy a portlet?

Junior Member 帖子: 44 加入日期: 08-1-8 最近的帖子
Michael Saechang:
Hey Maxi,

You could also uninstall portlets through the Update Manager. Another way if you're using tomcat is to delete the folder the portlet is in in wepapps while tomcat is running and it should unregister the portlet.

hope this helps

-mike


Hey Mike,
I am looking at the Update Manager but don't know how to undeploy portlet using it.
please tell me more about how to use it to undeploy.

Thank you so much.
thumbnail
Michael Saechang,修改在16 年前。

RE: How to undeploy a portlet?

Liferay Master 帖子: 576 加入日期: 07-11-19 最近的帖子
Hey Maxi,

There should be a Uninstall button, but that depends on what version of Liferay you are using. Which version are you currently using?

-mike
Maxi Ng,修改在16 年前。

RE: How to undeploy a portlet?

Junior Member 帖子: 44 加入日期: 08-1-8 最近的帖子
Mike

I am using liferay-portal-jboss-tomcat-4.2-4.4.1.zip

screen capture attached.
thumbnail
Kristjan Cočev,修改在16 年前。

RE: How to undeploy a portlet?

New Member 帖子: 14 加入日期: 07-1-20 最近的帖子
On tomcat you undeploy any bundle, be it a portlet, theme or any other "war" the following way:

go to tomcat_server_root/webapps

and delete the directory named after your war file.

The tomcat can be running (no need for restart/stop) and in the log file you shall see that Liferay has successfully undeployed the thing.
thumbnail
Michael Saechang,修改在16 年前。

RE: How to undeploy a portlet?

Liferay Master 帖子: 576 加入日期: 07-11-19 最近的帖子
I see. The version of Liferay you are currently using does not have the uninstall button feature in the Update Manager. The way I would undeploy or remove the portlet is the same way Kristjan is suggesting. Does it undeploy when you delete it from your wepapps folder?

-mike
Maxi Ng,修改在16 年前。

RE: How to undeploy a portlet?

Junior Member 帖子: 44 加入日期: 08-1-8 最近的帖子
Hi Mike,

It does undeploy if I del it, but the application server will keep telling you that some deployed application is missing.
It will keep doing this scan and use many resources.
This is what I am trying to resolve.

I use the JBoss bundle, maybe tomcat bundle won't have this trouble.
I will try to update my update manager version to see if I can have the uninstall function.

thank you.
Richard Learn,修改在14 年前。

RE: How to undeploy a portlet?

New Member 帖子: 16 加入日期: 09-3-26 最近的帖子
I tried to undeploy the portlet using the update manager then unsintall and it says "processed successfully" but, the portlet is still there.
Why?
John H Rosocha,修改在16 年前。

RE: How to undeploy a portlet?

New Member 帖子: 4 加入日期: 08-2-29 最近的帖子
I've follow the user posted steps here for undeploying portlets.

I see a bunch of these in the logs (My previous tests):

11:57:14,049 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 my_summary_portlet_WAR_mysummaryportlet
11:57:14,055 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 BookmarkPortlet_WAR_bookmarkportlet
11:57:14,060 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 StrutsPortlet2_WAR_struts2portlet2011
11:57:14,065 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 my_summary_portlet_WAR_MyInfoPortlet
11:57:14,316 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 my_summary_portlet_WAR_mysummaryportlet
11:57:14,322 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 BookmarkPortlet_WAR_bookmarkportlet
11:57:14,327 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 StrutsPortlet2_WAR_struts2portlet2011
11:57:14,332 WARN [PortletLocalServiceImpl:142] Portlet not found for 10097 my_summary_portlet_WAR_MyInfoPortlet


A quick look in the DB shows more portlet references in :
RESOURCECODE_
RESOURCE_
LAYOUT_

Probably mode.

Does Liferay have a definitive guide for removing a portlet? A SQL script, perhaps?




Maxi Ng:
I know there is a way to undeploy.
1. close added application
2. turn off liferay
3. delete the .war in server\default\deploy
4. remove the reference to the Portlets in the PortletPreferences table.

But I have some questions.
1. is this the way that Liferay recommand to undeploy?
2. is it safe?
3. is it the only way to undeploy?
4. if I am not using an external database, how can I delete the reference?

Does anyone knows?
Thank you for the reply.
Maxi Ng,修改在16 年前。

RE: How to undeploy a portlet?

Junior Member 帖子: 44 加入日期: 08-1-8 最近的帖子
Hey John,

What you said is exactly what I am asking, thank you for explaining my question so clearly for me.

anyone knows the answer?
Lawrence Magiera,修改在15 年前。

RE: How to undeploy a portlet?

New Member 帖子: 6 加入日期: 08-1-24 最近的帖子
Maxi Ng:
Hey John,

What you said is exactly what I am asking, thank you for explaining my question so clearly for me.

anyone knows the answer?


ANYONE?
thumbnail
James Min,修改在15 年前。

RE: How to undeploy a portlet?

Expert 帖子: 293 加入日期: 06-8-14 最近的帖子
You need to remove the portlet via the GUI from the page where the portlet was placed. X it out. The log messages mean that the portal is looking at the page settings and seeing that the portlet is supposed to be there. But if you have removed it from tomcat/webapps already, it's like you're asking the portal to display something that has no resource (webapps directory).

If you want to clean it up, you can put it back in webapps (the portlets), go back to that page where it has been placed. remove the portlets from the page and any other pages, *then* removed it from tomcat/webapps.

Otherwise you will have to manually clean up the DB, which could lead to errors.
Lawrence Magiera,修改在15 年前。

RE: How to undeploy a portlet?

New Member 帖子: 6 加入日期: 08-1-24 最近的帖子
James,

Thanks for the reply; your time and advice are truly appreciated.

We are currently developing many portlets. The scenario (on a developer's box) is that a portlet has been previously deployed and displayed on a page and is frequently being replaced with a newer version for whatever reason. We use an ant task to build and deploy war files to the liferay installation. The ant task stops tomcat, copies the war file to the hot deploy directory and restarts tomcat. Once Liferay has been restarted, it "sees" the new war file and "re-deploys" it. All without the manual intervention of "X'ing" out the portlet, I might add. (Sound sloppy?)

So, (I'm guessing here) it looks like there remain "pointers" to the previous instances of the portlet. I understand the types of problems that could arise from manually cleaning up any DB but if you could recommend which tables need to be looked at, I can take steps to ensure that I have a stable version of the DB to fall back on should I issue some erroneous SQL :-)

In addition to any suggestions you may have for cleaning up the "obsolete pointers", would you also have any general suggestion for improving that automated deploy process that I described above?

Again, James, thanks very much for any and all help with these questions,
Larry


James Min:
You need to remove the portlet via the GUI from the page where the portlet was placed. X it out. The log messages mean that the portal is looking at the page settings and seeing that the portlet is supposed to be there. But if you have removed it from tomcat/webapps already, it's like you're asking the portal to display something that has no resource (webapps directory).

If you want to clean it up, you can put it back in webapps (the portlets), go back to that page where it has been placed. remove the portlets from the page and any other pages, *then* removed it from tomcat/webapps.

Otherwise you will have to manually clean up the DB, which could lead to errors.
thumbnail
James Min,修改在15 年前。

RE: How to undeploy a portlet?

Expert 帖子: 293 加入日期: 06-8-14 最近的帖子
You do not have to stop Tomcat when autodeploying. Simply copy the updated WAR to the auto deploy directory and Liferay will "hot deploy" the portlet. That is one of the features of autodeploy, so you do not have to restart Tomcat.

If your portlet.xml and liferay-portlet.xml have not changed as far as portlet identifiers, there will be no stale "pointers" It will remain the same in the DB.

If there seems to be a problem and the page does not seem to be updated, it most likely is a caching issue. Try removing the tomcat/work directory, clearing browser cache, and doing a hard refrresh (CTRL-F5). If that fails, undeploy the portlet (remove from webapps) and deploy the updated WAR.



Lawrence Magiera:
James,

Thanks for the reply; your time and advice are truly appreciated.

We are currently developing many portlets. The scenario (on a developer's box) is that a portlet has been previously deployed and displayed on a page and is frequently being replaced with a newer version for whatever reason. We use an ant task to build and deploy war files to the liferay installation. The ant task stops tomcat, copies the war file to the hot deploy directory and restarts tomcat. Once Liferay has been restarted, it "sees" the new war file and "re-deploys" it. All without the manual intervention of "X'ing" out the portlet, I might add. (Sound sloppy?)

So, (I'm guessing here) it looks like there remain "pointers" to the previous instances of the portlet. I understand the types of problems that could arise from manually cleaning up any DB but if you could recommend which tables need to be looked at, I can take steps to ensure that I have a stable version of the DB to fall back on should I issue some erroneous SQL :-)

In addition to any suggestions you may have for cleaning up the "obsolete pointers", would you also have any general suggestion for improving that automated deploy process that I described above?

Again, James, thanks very much for any and all help with these questions,
Larry


James Min:
You need to remove the portlet via the GUI from the page where the portlet was placed. X it out. The log messages mean that the portal is looking at the page settings and seeing that the portlet is supposed to be there. But if you have removed it from tomcat/webapps already, it's like you're asking the portal to display something that has no resource (webapps directory).

If you want to clean it up, you can put it back in webapps (the portlets), go back to that page where it has been placed. remove the portlets from the page and any other pages, *then* removed it from tomcat/webapps.

Otherwise you will have to manually clean up the DB, which could lead to errors.
Matt King,修改在15 年前。

RE: [Liferay Forums][3. Development] RE: How to undeploy a portlet?

Junior Member 帖子: 60 加入日期: 08-7-10 最近的帖子
James-



In our experience, hot deploy does not always work in liferay. We have two liferay servers running 4.4 (load balanced)…one of them hot-deploys fine, the other does not and needs to be restarted.



Just my $.02.



-Matt



From: James Min at Liferay's Community Forums [mailto:no-reply@liferay.com]
Sent: Monday, August 04, 2008 1:25 PM
To: mb.239390.1144929@events.liferay.com
Subject: [Liferay Forums][3. Development] RE: How to undeploy a portlet?



You do not have to stop Tomcat when autodeploying. Simply copy the updated WAR to the auto deploy directory and Liferay will "hot deploy" the portlet. That is one of the features of autodeploy, so you do not have to restart Tomcat.

If your portlet.xml and liferay-portlet.xml have not changed as far as portlet identifiers, there will be no stale "pointers" It will remain the same in the DB.

If there seems to be a problem and the page does not seem to be updated, it most likely is a caching issue. Try removing the tomcat/work directory, clearing browser cache, and doing a hard refrresh (CTRL-F5). If that fails, undeploy the portlet (remove from webapps) and deploy the updated WAR.




Lawrence Magiera:

James,

Thanks for the reply; your time and advice are truly appreciated.

We are currently developing many portlets. The scenario (on a developer's box) is that a portlet has been previously deployed and displayed on a page and is frequently being replaced with a newer version for whatever reason. We use an ant task to build and deploy war files to the liferay installation. The ant task stops tomcat, copies the war file to the hot deploy directory and restarts tomcat. Once Liferay has been restarted, it "sees" the new war file and "re-deploys" it. All without the manual intervention of "X'ing" out the portlet, I might add. (Sound sloppy?)

So, (I'm guessing here) it looks like there remain "pointers" to the previous instances of the portlet. I understand the types of problems that could arise from manually cleaning up any DB but if you could recommend which tables need to be looked at, I can take steps to ensure that I have a stable version of the DB to fall back on should I issue some erroneous SQL :-)

In addition to any suggestions you may have for cleaning up the "obsolete pointers", would you also have any general suggestion for improving that automated deploy process that I described above?

Again, James, thanks very much for any and all help with these questions,
Larry



James Min:

You need to remove the portlet via the GUI from the page where the portlet was placed. X it out. The log messages mean that the portal is looking at the page settings and seeing that the portlet is supposed to be there. But if you have removed it from tomcat/webapps already, it's like you're asking the portal to display something that has no resource (webapps directory).

If you want to clean it up, you can put it back in webapps (the portlets), go back to that page where it has been placed. remove the portlets from the page and any other pages, *then* removed it from tomcat/webapps.

Otherwise you will have to manually clean up the DB, which could lead to errors.


--
Liferay Community Forum
mb.239390.1144929@events.liferay.com
http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1144929

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.5.12/1590 - Release Date: 8/4/2008 8:09 AM
Maxi Ng,修改在15 年前。

RE: How to undeploy a portlet?

Junior Member 帖子: 44 加入日期: 08-1-8 最近的帖子
Lawrence Magiera:
Maxi Ng:
Hey John,

What you said is exactly what I am asking, thank you for explaining my question so clearly for me.

anyone knows the answer?


ANYONE?


Well, I mean anybody?
sorry for my faulty english :p
thumbnail
James Min,修改在15 年前。

RE: How to undeploy a portlet?

Expert 帖子: 293 加入日期: 06-8-14 最近的帖子
There's no "definitive guide" but you have to make sure you are avoiding minor DB corruption by removing it from the portal config via the GUI, by removing from the pages.

After that, then you can actually remove it from the app server directory.