NPE in bottom-up web service wizard if the project require another (non-Dynamic Web) project [message #146771] |
Wed, 09 November 2005 20:20 |
Eclipse User |
|
|
|
Originally posted by: francois.NOSPAM.granade.com
I have two projects:
- a simple Java project that creates a library (call it "simple-project")
- a Dynamic Web Project (call it "web-project")
The dynamic web project needs source files from the java project. So I made the following changes (probably not all of them are good, or even required):
a) add the simple project to the "Required projects on the build path" (in the "Java Build Path" project properties)
b) make the simple project exported in the "Order and Export" tab of the "Java Build Path" project properties
c) created a linked directory to the simple project, and add the source folder of the simple project to the source folders of the web project (in the "Java Build Path" project properties)
d) added by hand a line "<wb-resource source-path="/simple-project/src" deploy-path="/WEB-INF/classes"/>" to the .wtpmodules file
I finally have it compiling, and when I use an old Web service I had created long time ago (I don't remember how I had created it), everthing works correctly.
But if I am following the bottom-up web service tutorial to create a web service, then I get a null pointer exception:
WAB0014E Unexpected exception occured.
null
java.lang.NullPointerException
at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspath(ClasspathUtils.java:88)
at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.classpathEntry2String(ClasspathUtils.java:262)
at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspathForJavaProject(ClasspathUtils.java:227)
at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspath(ClasspathUtils.java:130)
at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspathString(ClasspathUtils.java:61)
at org.eclipse.jst.ws.internal.axis.creation.ui.task.DefaultsFo rServerJavaWSDLCommand.execute(DefaultsForServerJavaWSDLComm and.java:118)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.runCommand(CommandFragmentEngine.java:335)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.visitTop(CommandFragmentEngine.java:301)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.moveForwardToNextStop(CommandFragmentEngine.jav a:217)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleComman dEngineManager$4.run(SimpleCommandEngineManager.java:208)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:346)
(...)
This is WTP 0.7.
I've tried to debug it, the problem is when looking up the source path for the "/simple-project" project.
I am starting to think that there are several other issues with referencing other projects in an Dynamic Web Project; but nothing so bad as a NPE so far :-)
Which of the a), b), c), d) is the good method to add source files to another project and have it work ? I can try all of them but maybe someone has the answer...
Something I have not tried yet (beside the a), b), c), d), above) is to add my "simple-project" to the "Project References" of the web project. Would it solve it ?
Also, NPEs are bad I suppose :-). Should I log it as a bug ? Any idea about information that could help fix it ?
thanks
|
|
|
Re: NPE in bottom-up web service wizard if the project require another (non-Dynamic Web) project [message #146791 is a reply to message #146771] |
Thu, 10 November 2005 19:27 |
Jeff Shirley Messages: 6 Registered: July 2009 |
Junior Member |
|
|
I had this problem for a long time, but it's been fixed in bug 107808.
You need to use one of the newer integration builds (or make the project
dependencies all web projects instead of normal Java projects) if this
is a critical problem for you. I'm currently using I20051015 and the
problem is fixed in that one. Read the bug comments carefully,
especially the last part about the dependent JAR file requirement.
Hope this helps,
Jeff
Francois Granade wrote:
> I have two projects:
> - a simple Java project that creates a library (call it "simple-project")
> - a Dynamic Web Project (call it "web-project")
>
> The dynamic web project needs source files from the java project. So I made the following changes (probably not all of them are good, or even required):
> a) add the simple project to the "Required projects on the build path" (in the "Java Build Path" project properties)
> b) make the simple project exported in the "Order and Export" tab of the "Java Build Path" project properties
> c) created a linked directory to the simple project, and add the source folder of the simple project to the source folders of the web project (in the "Java Build Path" project properties)
> d) added by hand a line "<wb-resource source-path="/simple-project/src" deploy-path="/WEB-INF/classes"/>" to the .wtpmodules file
>
> I finally have it compiling, and when I use an old Web service I had created long time ago (I don't remember how I had created it), everthing works correctly.
>
> But if I am following the bottom-up web service tutorial to create a web service, then I get a null pointer exception:
> WAB0014E Unexpected exception occured.
> null
> java.lang.NullPointerException
> at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspath(ClasspathUtils.java:88)
> at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.classpathEntry2String(ClasspathUtils.java:262)
> at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspathForJavaProject(ClasspathUtils.java:227)
> at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspath(ClasspathUtils.java:130)
> at org.eclipse.jst.ws.internal.axis.consumption.ui.util.Classpa thUtils.getClasspathString(ClasspathUtils.java:61)
> at org.eclipse.jst.ws.internal.axis.creation.ui.task.DefaultsFo rServerJavaWSDLCommand.execute(DefaultsForServerJavaWSDLComm and.java:118)
> at org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.runCommand(CommandFragmentEngine.java:335)
> at org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.visitTop(CommandFragmentEngine.java:301)
> at org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.moveForwardToNextStop(CommandFragmentEngine.jav a:217)
> at org.eclipse.wst.command.internal.env.ui.widgets.SimpleComman dEngineManager$4.run(SimpleCommandEngineManager.java:208)
> at org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:346)
> (...)
>
>
> This is WTP 0.7.
>
> I've tried to debug it, the problem is when looking up the source path for the "/simple-project" project.
>
> I am starting to think that there are several other issues with referencing other projects in an Dynamic Web Project; but nothing so bad as a NPE so far :-)
>
> Which of the a), b), c), d) is the good method to add source files to another project and have it work ? I can try all of them but maybe someone has the answer...
>
> Something I have not tried yet (beside the a), b), c), d), above) is to add my "simple-project" to the "Project References" of the web project. Would it solve it ?
>
> Also, NPEs are bad I suppose :-). Should I log it as a bug ? Any idea about information that could help fix it ?
>
> thanks
>
|
|
|
Re: NPE in bottom-up web service wizard if the project require another (non-Dynamic Web) project [message #146813 is a reply to message #146791] |
Thu, 10 November 2005 23:27 |
Eclipse User |
|
|
|
Originally posted by: francois.NOSPAM.granade.com
Thank you for the verry precise details. I should have looked at the bug
list first..
Jeff Shirley <jshirley@cs.virginia.edu> wrote:
> I had this problem for a long time, but it's been fixed in bug 107808.
>
> You need to use one of the newer integration builds (or make the project
> dependencies all web projects instead of normal Java projects) if this
> is a critical problem for you. I'm currently using I20051015 and the
> problem is fixed in that one. Read the bug comments carefully,
> especially the last part about the dependent JAR file requirement.
> Hope this helps,
> Jeff
>
|
|
|
Powered by
FUDForum. Page generated in 0.02809 seconds