Sunday, June 01, 2008

Pluto Server Plug-in: Could not publish to server NPE bug

Some users of the Pluto server plug-in have had trouble getting a simple plug-in to deploy. They receive an error message:
Could not publish to the server.

Unfortunately, I've not been able to recreate the "Could not publish to the server" error. I have created a new, clean Eclipse workspace and install, and went through the tutorial and it all still works.

For those who are experiencing problems, I've added a test portlet eclipse project that you can import and try to deploy to Pluto. Some other troubleshooting ideas
  • Make sure that you have a portlet.xml along with your portlet code. That will be necessary. See the eclipse project above for a simple example.
  • When first doing the deploy, you'll need to be connected to the internet so that the Maven ant tasks can download the pluto dependencies. This is only required the first time you use the plug-in to deploy to a pluto server.
  • Check ECLIPSE_WORKSPACE/.metadata/.log. It may have more details regarding the exact nature of the error. If you find anything, please do share it with me; I'd love to get to the bottom of this bug.
In other Pluto Server Plug-in related business, I hope to have the code moved over to Google Code sometime this month.


javabean said...

Hi Marcus Christie,

great to see some activity on this plugin again. Is there an open source version yet ?

For the portlet development community, it is important that there are handy development tools available, and your plugin is a nice addition.

Kind regards,


Craig D said...

Hey Marcus!

I, too, am anxious to see your code open sourced.

campi said...

I am getting the could not publish when using my own or the test portlet you published. Here is what is in the log, any ideas. I tried the suggestions you had posted:

!ENTRY org.eclipse.wst.server.core 4 0 2008-07-22 14:27:18.813
!MESSAGE Could not publish to the server.
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.getDeployUriOfComponent(
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.getURI(
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.guessModuleName(
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.getPublishProperties(
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(
at org.eclipse.wst.server.core.internal.Server.doPublish(
at org.eclipse.wst.server.core.internal.Server.publish(