• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Deploying a Portlet - NullPointer Blues

Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,

So I've been working on this portlet, installing it into Liferay 5.2 at each new piece of functionality to test as I go.

On the last installation, I got this error:

Expanding: /Data/liferay-portal-5.2-ee-sp5/deploy/wbservicecatalog-portlet.war into /Data/liferay-portal-5.2-ee-sp5/tomcat-6.0.29/temp/20110513170938581
Copying 1 file to /Data/liferay-portal-5.2-ee-sp5/tomcat-6.0.29/temp/20110513170938581/WEB-INF
Copying 1 file to /Data/liferay-portal-5.2-ee-sp5/tomcat-6.0.29/temp/20110513170938581/WEB-INF/classes
Copying 1 file to /Data/liferay-portal-5.2-ee-sp5/tomcat-6.0.29/temp/20110513170938581/WEB-INF/classes
Copying 1 file to /Data/liferay-portal-5.2-ee-sp5/tomcat-6.0.29/temp/20110513170938581/META-INF
at com.liferay.portal.deploy.auto.WAIAutoDeployer.copyXmls(WAIAutoDeployer.java:64)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:483)
at com.liferay.portal.tools.deploy.BaseDeployer.deployFile(BaseDeployer.java:792)
at com.liferay.portal.tools.deploy.BaseDeployer.deployFile(BaseDeployer.java:729)
at com.liferay.portal.tools.deploy.BaseDeployer.deploy(BaseDeployer.java:451)
at com.liferay.portal.deploy.auto.PortletAutoDeployer.autoDeploy(PortletAutoDeployer.java:93)
at com.liferay.portal.deploy.auto.PortletAutoDeployListener.deploy(PortletAutoDeployListener.java:80)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:182)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:223)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:51)
17:09:38,864 INFO [PortletAutoDeployListener:83] Portlets for /Data/liferay-portal-5.2-ee-sp5/deploy/wbservicecatalog-portlet.war copied successfully. Deployment will start in a few seconds.

I saw this JIRA on the issue at Liferay:Liferay JIRA

But that wasn't helpful. I haven't changed any of the file structure since my last successful portlet deployment. I haven't edited any of the .XML configuration files either.

Googling this brings back nothing but that JIRA, so I'm curious as to whether any of you guys have seen this or if I'm just finding unique ways to break my portlets...

Guy deLyonesse
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well my tradition of figuring out the problem within minutes of posting a question seems to be holding.

Turns out my portlet.xml file had, in fact, been deleted somehow. I don't know how, maybe I fat-fingered the delete key at the wrong moment or something.

You know, as part of tracking down this problem I went through the Liferay source code and it occurs to me that it would be simplicity itself for them to have thrown a more useful error message than the ubiquitous Java.lang.NullPointerException. Almost every one of those methods in the stack trace has the file as a parameter and the filenames it looks for are hard coded.

C'mon, guys at Liferay couldn't you have tossed the expected filename out in a custom error?
She'll be back. I'm just gonna wait here. With this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic