Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6742665

NPE thrown for classpath issue in in @webmothod annotation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 6u5
    • tools
    • apt
    • sparc
    • solaris_2.5.1

      OPERATING SYSTEM(S):
      ALL

      FULL JDK VERSION(S):
      java version "1.6.0_05"
      Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
      Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)

      DESCRIPTION:
      1. Download the attached zip file
      2. run "wsgen -cp . com.service.Locator", without having the com.test
         package in path

      Below NullPoniterException is thrown instead of a ClassNotFoundException or any other meaningful exception:

      Problem encountered during annotation processing;
      see stacktrace below for more information.
      java.lang.NullPointerException
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.isSubtype(WebServiceAP.java:345)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.isRemote(WebServiceAP.java:340)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.isLegalType(WebServiceVisitor.java:750)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.isLegalMethod(WebServiceVisitor.java:601)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.methodsAreLegal(WebServiceVisitor.java:573)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.isLegalImplementation(WebServiceVisitor.java:491)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.shouldProcessWebService(WebServiceVisitor.java:306)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:109)
              at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:311)
              at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:252)
              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:258)
              at com.sun.tools.apt.main.Main.compile(Main.java:1102)
              at com.sun.tools.apt.main.Main.compile(Main.java:964)
              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.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:197)
              at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:124)
              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 com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:100)
              at com.sun.tools.internal.ws.WsGen.main(WsGen.java:38)
      error: compilation failed, errors should have been reported


      Expected result:
      A meaningful exception like a ClassNotFoundException should be thrown.

            darcy Joe Darcy
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: