... It irritates.
In wanting to unwind the promising Ben Corrie Blog on deploying a GWT application on SpringSource dm Server that I fell yesterday on a bug in my Eclipse environment that blocked me from the first stage.
Indeed, a simple export plugin fails miserably on a NullPointerException:
! ENTRY org.eclipse.ant.core April 1 2008-12-15 22:34:29.359 Post BUILD FAILED ! STACK 0 java.lang.NullPointerException at java.util.Hashtable.put (Hashtable.java: 394) at org.apache.tools.ant.PropertyHelper.setUserProperty (PropertyHelper.java: 379) org.apache.tools.ant.Project.setUserProperty at (Project.java: 537) at org.eclipse.ant.internal.core.ant.InternalAntRunner.setProperties (InternalAntRunner.java: 233) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run (InternalAntRunner.java: 554) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run (InternalAntRunner.java: 456) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke (Method.java: 597) at org.eclipse.ant.core.AntRunner.run (AntRunner.java: 378) at at at at org.eclipse.pde.internal.ui.build.FeatureExportJob.run (FeatureExportJob.java: 55) at org.eclipse.core.internal.jobs.Worker.run (Worker.java: 55)
(From <workspace> / .metadata / .log)
Relatively annoyed by this blockage, I began to find the cause of the problem ... Fortunately for me, it was not so difficult to find.
In short, I:
- created a new "Eclipse Application" in "Run Configurations", remembering to specify arguments qq memories that go far: I used-Xms40m-Xmx512m-XX: PermSize = 64m-XX: MaxPermSize = 256m
- launched the application in debug mode => which forks a new Eclipse
- specified points of break org.eclipse.pde.internal.core.exports.FeatureExportOperation included in the jar org.eclipse.pde.core_3.4.0.v20080903-1700.jar
- and began to understand the problem.
(All this of course, having first studied the code a bit in this class. I'm pretending I did not look for sources, I quickly decompiled code decompiler jar with the excellent Emmanuel: JD-GUI )
The cause of my problem was the presence of a key WEBLOGIC_HOME with a null value in the properties sent to Ant ...
In seeking a little more, I found in the preferences of my Eclipse workspace in the section Ant> Runtime> Properties that expensive Weblogic plugin for Eclipse automatically defined WEBLOGIC_HOME property, that information from the configuration in Weblogic defined in Server> Runtime Environments.
Yes but now in my workspace SpringSource dm Server dedicated to, I did not set this environment ... What caused the problem.
Like what, have multiple Eclipse workspaces is not always a good idea ...


