Java jlee on 20 Jul 2006 10:06 am
NullPointerException in Liferay
When I try to deploy any portlet war in Liferay I get a NullPointerException. Even using the samples they bundle. Has anyone see that and know how to fix it?
15:58:10,703 INFO [com.liferay.portal.deploy.AutoDeployPortletListener] Copying portlets for d:\dl\liferay\deploy\jsf-portlet.war
Deploying jsf-portlet.war
Expanding: d:\dl\liferay\deploy\jsf-portlet.war into d:\dl\liferay\tomcat\temp\20060720155811031
Modifying d:\dl\liferay\tomcat\temp\20060720155811031\WEB-INF\web.xml
java.lang.NullPointerException
at com.liferay.util.FileUtil.listFiles(FileUtil.java:260)
at com.liferay.util.FileUtil.listFiles(FileUtil.java:252)
at com.liferay.portal.tools.BaseDeployer.deployDirectory(BaseDeployer.java:265)
at com.liferay.portal.tools.BaseDeployer.deployFile(BaseDeployer.java:308)
at com.liferay.portal.tools.BaseDeployer.deploy(BaseDeployer.java:216)
at com.liferay.portal.deploy.AutoPortletDeployer.deploy(AutoPortletDeployer.java:80)
at com.liferay.portal.deploy.AutoDeployPortletListener.deploy(AutoDeployPortletListener.java:79)
at com.liferay.portal.shared.deploy.AutoDeployDir.scanDirectory(AutoDeployDir.java:133)
at com.liferay.portal.shared.deploy.AutoDeployScanner.run(AutoDeployScanner.java:60)
15:58:11,953 INFO [com.liferay.portal.deploy.AutoDeployPortletListener] Portlets for d:\dl\liferay\deploy\jsf-portlet.war copied successfully
My portlet-ext.properties looks like:
portal.release=professional
portal.ctx=/
auto.deploy.dest.dir=d:/dl/liferay/tomcat/webapps
auto.deploy.deploy.dir=d:/dl/liferay/deploy
No matter what I try to deploy I get that NPE.
3 Responses to “NullPointerException in Liferay”









on 26 Jul 2006 at 9:25 am # Carlos
Set auto.deploy.tomcat.lib.dir to the appropriate full path in portal-ext.properties. It might be something like d:/dl/liferay/tomcat/common/lib/ext for your setup. Be sure that it exists before start tomcat.
I do not know why, but the default relative paths didn’t work for me too.
on 26 Jul 2006 at 9:36 am # jlee
Perfect! That did the trick. Thanks for that. I suppose I can quit cursing liferay now. Looks like they’re hardcoding absolute paths.