Thursday 9 August 2012

Unable to deploy portlet in Liferay

Problem: Unable to deploy portlet in Liferay Portal Server 6.1.0 CE. While deploying i am getting exceptions like "war does not support this version of Liferay" or " Add war to the blacklist"

 
com.liferay.portal.kernel.deploy.auto.AutoDeployException: sample-struts-portlet-6.1.0.1.war does not support this version of Liferay
 at com.liferay.portal.deploy.auto.PortletAutoDeployer.autoDeploy(PortletAutoDeployer.java:99)
 at com.liferay.portal.deploy.auto.PortletAutoDeployListener.deploy(PortletAutoDeployListener.java:78)
 at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
 at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
 at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: com.liferay.portal.kernel.deploy.auto.AutoDeployException: sample-struts-portlet-6.1.0.1.war does not support this version of Liferay
 at com.liferay.portal.tools.deploy.BaseDeployer.deployFile(BaseDeployer.java:746)
 at com.liferay.portal.deploy.auto.PortletAutoDeployer.autoDeploy(PortletAutoDeployer.java:96)
 ... 4 more
06:08:32,312 INFO  [AutoDeployDir:203] Add sample-struts-portlet-6.1.0.1.war to the blacklist 


Root Cause: The portlet is build with higher version of SDK than the current version of portal server. (i.e) The portlet is built with 6.2 SDK and deployed in 6.1 Liferay portal server.

Solution:
 Edit the file  "liferay-plugins-sdk-6.1.0-ce\portlets\sample-struts-portlet\docroot\WEB-INF\liferay-plugin-package.properties" and update the poperty "liferay-versions" and redploy the portlet.

 
liferay-versions=6.1.0
 

No comments:

Post a Comment