论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Maxi Ng
How to undeploy a portlet?
2008年2月27日 下午11:27
答复

Maxi Ng

等级: Junior Member

帖子: 50

加入日期: 2008年1月7日

最近的帖子

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
RE: How to undeploy a portlet?
2008年2月28日 上午6:22
答复

Ricardo Uhalde

等级: New Member

帖子: 9

加入日期: 2007年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
Michael Saechang
RE: How to undeploy a portlet?
2008年2月28日 上午10:28
答复

Michael Saechang

LIFERAY STAFF

等级: Liferay Master

帖子: 577

加入日期: 2007年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
RE: How to undeploy a portlet?
2008年3月2日 下午7:08
答复

Maxi Ng

等级: Junior Member

帖子: 50

加入日期: 2008年1月7日

最近的帖子

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.
Michael Saechang
RE: How to undeploy a portlet?
2008年3月3日 上午11:30
答复

Michael Saechang

LIFERAY STAFF

等级: Liferay Master

帖子: 577

加入日期: 2007年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
RE: How to undeploy a portlet?
2008年3月3日 下午6:02
答复

Maxi Ng

等级: Junior Member

帖子: 50

加入日期: 2008年1月7日

最近的帖子

Mike

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

screen capture attached.
附件: updateManager.bmp (612.9k)
Kristjan Cočev
RE: How to undeploy a portlet?
2008年3月4日 上午5:02
答复

Kristjan Cočev

等级: New Member

帖子: 14

加入日期: 2007年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.
Michael Saechang
RE: How to undeploy a portlet?
2008年3月4日 上午10:49
答复

Michael Saechang

LIFERAY STAFF

等级: Liferay Master

帖子: 577

加入日期: 2007年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
RE: How to undeploy a portlet?
2008年3月4日 下午6:28
答复

Maxi Ng

等级: Junior Member

帖子: 50

加入日期: 2008年1月7日

最近的帖子

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.
John H Rosocha
RE: How to undeploy a portlet?
2008年3月5日 上午10:58
答复

John H Rosocha

等级: New Member

帖子: 4

加入日期: 2008年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
RE: How to undeploy a portlet?
2008年3月6日 下午6:54
答复

Maxi Ng

等级: Junior Member

帖子: 50

加入日期: 2008年1月7日

最近的帖子

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
RE: How to undeploy a portlet?
2008年6月4日 上午7:51
答复

Lawrence Magiera

等级: New Member

帖子: 6

加入日期: 2008年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?
James Min
RE: How to undeploy a portlet?
2008年6月4日 上午9:24
答复

James Min

LIFERAY STAFF

等级: Expert

帖子: 293

加入日期: 2006年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.
Maxi Ng
RE: How to undeploy a portlet?
2008年6月30日 下午9:17
答复

Maxi Ng

等级: Junior Member

帖子: 50

加入日期: 2008年1月7日

最近的帖子

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
James Min
RE: How to undeploy a portlet?
2008年7月10日 上午6:39
答复

James Min

LIFERAY STAFF

等级: Expert

帖子: 293

加入日期: 2006年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.
Lawrence Magiera
RE: How to undeploy a portlet?
2008年8月3日 上午9:44
答复

Lawrence Magiera

等级: New Member

帖子: 6

加入日期: 2008年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.
James Min
RE: How to undeploy a portlet?
2008年8月4日 上午10:24
答复

James Min

LIFERAY STAFF

等级: Expert

帖子: 293

加入日期: 2006年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
RE: [Liferay Forums][3. Development] RE: How to undeploy a portlet?
2008年8月4日 上午10:28
答复

Matt King

等级: Junior Member

帖子: 61

加入日期: 2008年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
Richard Learn
RE: How to undeploy a portlet?
2009年4月17日 上午6:58
答复

Richard Learn

等级: New Member

帖子: 16

加入日期: 2009年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?