Monday, October 24, 2011

Liferay: Error Registering Portlets

I got a problem when trying to undeploy a portlet on Liferay the standard way: removing the unzipped WAR in Tomcat's webapps/ dir and the cached information.

08:48:56,725 ERROR [HotDeployUtil:112] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for MyPortlet

It seemd like the portlet was somehow still in the page for Liferay and the message saying the portlet needed to be removed from the page did not show any buttons to do that. After a while I didn't have the message anymore but only an error page.

Some googling brought me on a page in the Liferay forum where they suggested to remove the portlet-api-2.0.jar from the lib/ directory of the WAR and redeploy it:

> zip -d MyPortlet.war /WEB-INF/lib/portlet-api-2.0.jar

It actually worked. Don't ask me why.

1 comment:

sivakrishna said...

Hi.
I do also get the same error and I dont have portlet-api-2.0 jar in Lib directory.
Could u please remember if you did anyother changes to get rid off the error