Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why
« Back to Using Liferay

Plugin Deployment Troubleshooting

The purpose of this article is to document the typical errors that are often found when deploying themes, layout templates and portlets to Liferay.

Unable to process deployment descriptor for context 'null' #

Check that you've deployed the WAR file to Liferay's autodeploy directory and not to the deploy directory of the application server directly.

By default Liferay's autodeploy directory will be in: $USER_HOME/liferay/deploy (assuming 'your-user' is the name of the user that runs Liferay). $USER_HOME is /home/your-user in UNIX based systems such as Linux and MacOS and c:\Document and Settings\your-user in Windows.

You can change the directory in Plugin Installer portlet -> Configuration (version 4.3), Admin porttlet (4.1, 3.6. etc.) or in file.

It is absolutely essential that the paths are correct, you have access to them and that you deploy (copy the war) into the Deploy Directory, not into Destination Directory .

The WAR disappears but it's not available to the portal #

This means that there has been an error during the deployment process. The WAR is removed so that Liferay does not get into a loop trying to deploy it again and again.

To find out which was the error take a look at the logs of the application server. On Jboss logs could be found at server/default/log/server.log

ERROR [portal-web.docroot.html.portal.render_portlet.jsp] java.lang.NullPointerException #

You can get an exception like this:

ERROR [portal-web.docroot.html.portal.render_portlet.jsp] java.lang.NullPointerException

      at com.liferay.portlet.CachePortlet._invoke(
      at com.liferay.portlet.CachePortlet.render(
      at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(
      at org.apache.jasper.runtime.HttpJspBase.service(
      at javax.servlet.http.HttpServlet.service(
      at org.apache.jasper.servlet.JspServletWrapper.service(
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(
      at org.apache.jasper.servlet.JspServlet.service(

It happens if you try to deploy the portlet, and it is not fully deployed before you update the page that contains that portlet. To avoid that you need to fully deploy portlet before updating the page. You can observe the deployment process in the logs or just give it some time, one minute is usually sufficient. To get rid of the error you need to rebuild your war and deploy it again.

Absolute vs. Relative Path #

By default the Destination Directory is ../server/default/deploy which is a relative path. It starts from your /bin folder in JBoss/Tomcat where the startup script is located. If you want to start it from some other place you need to use absolute path instead of relative.

“Incorrect zip format” exception #

Sometimes liferay starts deployment before the file is fully copied. You would get “Incorrect zip format” exception. You just need to update the timestamp on the war or rebuild it and deploy again to fix this problem. It might only apply to older versions of Liferay 4.1 and older.

Log shows that the portlet was copied, but it doesn't appear in the list #

You get something like:

 14:07:32,029 INFO [STDOUT] 14:07:32,028 INFO [AutoDeployDir:76] Processing sample-test-portlet-
 14:07:32,029 INFO [STDOUT] 14:07:32,029 INFO [PortletAutoDeployListener:77] Copying portlets for /home/jboss/liferay/deploy/sample-test-portlet-
 14:07:32,031 INFO [STDOUT] 14:07:32,030 INFO [BaseDeployer:482] Deploying sample-test-portlet-
 14:07:32,034 INFO [STDOUT] Expanding: /home/jboss/liferay/deploy/sample-test-portlet- into /tmp/20071029140732032
 14:07:32,052 INFO [STDOUT] Copying 1 file to /tmp/20071029140732032/WEB-INF
 14:07:32,105 INFO [STDOUT] Copying 1 file to /tmp/20071029140732032/WEB-INF
 14:07:32,133 INFO [STDOUT] 14:07:32,132 INFO [BaseDeployer:992] Modifying Geronimo /tmp/20071029140732032/WEB-INF/geronimo-web.xml
 14:07:32,151 INFO [STDOUT] 14:07:32,150 INFO [BaseDeployer:1038] Modifying Servlet 2.3 /tmp/20071029140732032/WEB-INF/web.xml
 14:07:32,168 INFO [STDOUT] Copying 22 files to /opt/jboss-4.2.1.GA/bin/../server/default/deploy/sample-test-portlet.war
 14:07:32,181 INFO [STDOUT] Copying 1 file to /opt/jboss-4.2.1.GA/bin/../server/default/deploy/sample-test-portlet.war
 14:07:32,181 INFO [STDOUT] Deleting directory /tmp/20071029140732032
 14:07:32,184 INFO [STDOUT] 14:07:32,183 INFO [PortletAutoDeployListener:87] Portlets for /home/jboss/liferay/deploy/sample-test-portlet- copied successfully

you don't see the portlet appearing in the list of available portlets after that. It doesn't mean that the portlets were deployed, it means something went wrong. Most likely it is this path: /opt/jboss-4.2.1.GA/bin/../server/default/deploy/ that is wrong. It is relative and could be referencing incorrect path, change the Destination Path to absolute and it should deploy without problems. You would see something like this when deploying:

 17:22:33,765 INFO  [AutoDeployDir] Processing sample-portal-client-portlet-
 17:22:33,765 INFO  [PortletAutoDeployListener] Copying portlets for C:\jboss\autodeploy\sample-portal-client-portlet-
 17:22:33,765 INFO  [BaseDeployer] Deploying sample-portal-client-portlet-
 17:22:33,859 INFO  [STDOUT]   Expanding: C:\jboss\autodeploy\sample-portal-client-portlet- into C:\DOCUME~1\rhoyenko\LOCALS~1\Temp\20071030172233765
 17:22:34,156 INFO  [STDOUT]   Copying 1 file to C:\DOCUME~1\rhoyenko\LOCALS~1\Temp\20071030172233765\WEB-INF
 17:22:34,468 INFO  [STDOUT]   Copying 1 file to C:\DOCUME~1\rhoyenko\LOCALS~1\Temp\20071030172233765\WEB-INF
 17:22:35,125 INFO  [BaseDeployer] Modifying Geronimo C:\DOCUME~1\rhoyenko\LOCALS~1\Temp\20071030172233765\WEB-INF\geronimo-web.xml
 17:22:35,219 INFO  [BaseDeployer] Modifying Servlet 2.3 C:\DOCUME~1\rhoyenko\LOCALS~1\Temp\20071030172233765\WEB-INF\web.xml
 17:22:35,297 INFO  [STDOUT]   Copying 21 files to C:\jboss\server\default\deploy\sample-portal-client-portlet.war
 17:22:35,500 INFO  [STDOUT]   Copying 1 file to C:\jboss\server\default\deploy\sample-portal-client-portlet.war
 17:22:35,515 INFO  [STDOUT]   Deleting directory C:\DOCUME~1\rhoyenko\LOCALS~1\Temp\20071030172233765
 17:22:35,578 INFO  [PortletAutoDeployListener] Portlets for C:\jboss\autodeploy\sample-portal-client-portlet- copied successfully
 17:22:36,750 INFO  [TomcatDeployer] deploy, ctxPath=/sample-portal-client-portlet, warUrl=.../deploy/sample-portal-client-portlet.war/
 17:22:37,141 INFO  [PluginPackageHotDeployListener] Reading plugin package for sample-portal-client-portlet
 17:22:37,547 INFO  [PluginPackageHotDeployListener] Plugin package liferay/sample-portal-client-portlet/ registered successfully
 17:22:37,562 INFO  [PortletHotDeployListener] Registering portlets for sample-portal-client-portlet
 17:22:37,625 INFO  [PortletHotDeployListener] Portlets for sample-portal-client-portlet registered successfully

NullPointerException from Log4j #

This is caused by what seems to be a bug in Tomcat. It's been notified by the Log4j developers to the Tomcat developers but for some reason it's not being fixed.

Fortunately there is a workaround. Run Tomcat with the following option:


This will be the default option in bundles from version 5.1

BeanLocator is not set #

This error appears when the plugin uses ServiceBuilder and Spring has not been initialized correctly. Make sure the web.xml file of the plugin has a similar code to:


See Also #

0 Attachments
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Threaded Replies Author Date
I am using SDK 6.05 but my portal code is... ilke Muhtaroglu January 10, 2011 4:16 AM
Hi, I encountered the same issue. It seems that... Kyrre Myrbostad February 10, 2011 6:44 AM
Setty, please ask you questions either in the... Ray Augé April 6, 2013 8:58 AM

I am using SDK 6.05 but my portal code is Liferay 6.10

due to that I face the following problems...

I want to switch to the lates SDK but I cant find its trunk and dont know how to compile it.

Can you please point me how to get the latest SDK from trunk and compile it.



1:57:15,664 INFO [PluginPackageUtil:1080] Reading plugin package for LoginLimitation
11:57:15,664 ERROR [HotDeployUtil:112] Error registering plugins for LoginLimitation Error registering plugins for LoginLimitation
at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletCon­
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycl­
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.­java:61)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.­java:51)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BaseP­
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(Port­
at org.apache.catalina.core.StandardContext.listenerStart(­)
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.addChildInternal(
­at org.apache.catalina.core.ContainerBase.addChild(
at org.apache.catalina.core.StandardHost.addChild(
at org.apache.catalina.startup.HostConfig.deployDirectory(
at org.apache.catalina.startup.HostConfig.deployDirectories(
at­ org.apache.catalina.startup.HostConfig.deployApps(
at org.apache.catalina.startup.HostConfig.start(
at org.apache.catalina.startup.HostConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.ja­va:119)
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at­ sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav­a:43)
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(
Caused by: java.lang.NullPointerException
at com.liferay.portal.plugin.PluginPackageUtil._readPluginPackageServletContext(Plu­
at com.liferay.portal.plugin.PluginPackageUtil.readPluginPackageServletContext(Plug­
... 33 more
11:57:15,667 INFO [PortletHotDeployListener:223] Registering portlets for LoginLimitation

Posted on 1/10/11 4:16 AM.
Hi, I encountered the same issue. It seems that in 6EE you need to have set the name-tag in your liferay-plugin-package.xml with a value that ends in either "-portlet", "-hook", "-layouttpl", "-theme" or "-web". Else it will throw this error. Not sure if the error has any negative effect though.

We actually debugged the portal remotely in Eclipse to discover this emoticon
Posted on 2/10/11 6:44 AM in reply to ilke Muhtaroglu.
Setty, please ask you questions either in the Forums or as a comment on the wiki page.

Posted on 4/6/13 8:58 AM.