Damn. I just figured out to pass the hibernate annotation jars (which
where used by my package class) to wsgen. Sorry for the post...
thierry
Thierry Rietsch wrote:
> Hi
>
> I try to run the wsgen.sh script. Unfortunately I get a
> java.lang.NullPointerException during the wsgen of my classes.
>
> Jaxws Version: 2.0 / 2.0.1 M1
>
> Here is the Java source file:
> ==================================================
> package ch.teamrg.dev.rgrepd.webservice.server;
>
> import javax.jws.WebMethod;
> import javax.jws.WebService;
>
> @WebService()
> public class RGRepositoryDaemon {
> public RGRepositoryDaemon() {
> }
>
> @WebMethod()
> public ch.teamrg.dev.rgrepd.model.Package searchExactPackage(String
> packageName) {
> return null;
> }
> }
> ==================================================
>
> Here is the exception:
> ==================================================
> Problem encountered during annotation processing;
> see stacktrace below for more information.
> java.lang.NullPointerException
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.isSubtype(WebServiceAP.java:334)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.isRemote(WebServiceAP.java:329)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.isLegalType(WebServiceVisitor.java:789)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.isLegalMethod(WebServiceVisitor.java:621)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.methodsAreLegal(WebServiceVisitor.java:601)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.isLegalImplementation(WebServiceVisitor.java:521)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.shouldProcessWebService(WebServiceVisitor.java:332)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:125)
> at
> com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:300)
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:224)
> at
> com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
> at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
> at
> com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
> at com.sun.tools.apt.main.Main.compile(Main.java:1075)
> at com.sun.tools.apt.main.Main.compile(Main.java:938)
> at com.sun.tools.apt.Main.processing(Main.java:95)
> at com.sun.tools.apt.Main.process(Main.java:85)
> at com.sun.tools.apt.Main.process(Main.java:67)
> at
> com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:628)
> at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:561)
> at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56)
> 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:585)
> at com.sun.tools.ws.Invoker.main(Invoker.java:69)
> at com.sun.tools.ws.WsGen.main(WsGen.java:38)
> error: compilation failed, errors should have been reported
> ==================================================
>
> And this is the command i invoke on the shell:
> ==================================================
> ./wsgen.sh -classpath
> /home/thierry/development/eclipse/RGRepositoryDaemon/build/classes -d
> /home/thierry/development/eclipse/RGRepositoryDaemon/build/classes -wsdl
> -r
> /home/thierry/development/eclipse/RGRepositoryDaemon/WebContent/WEB-INF/wsdl/
> -s /home/thierry/development/eclipse/RGRepositoryDaemon/src
> ch.teamrg.dev.rgrepd.webservice.server.RGRepositoryDaemon
> ==================================================
>
> Has anyone an idea?
>
> thierry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>