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

WebService annotation processor cannot use javac internal APIs

XMLWordPrintable

    • Verified

      Running with -Dsun.reflect.debugModuleAccessChecks=true reveals this issue. Note that this is the standalone JAX-WS tools, it's not the version in the JDK (com.sun.tools.ws.processor.modeler.annotation.WebServiceAp is in com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAp in the JDK version)

      [jwsc] java.lang.IllegalAccessException: class com.sun.tools.ws.processor.modeler.annotation.WebServiceAp cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @544300a6
           [jwsc] at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-internal/Reflection.java:411)
           [jwsc] at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-internal/Reflection.java:402)
           [jwsc] at sun.reflect.Reflection.ensureMemberAccess(java.base@9-internal/Reflection.java:99)
           [jwsc] at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(java.base@9-internal/AccessibleObject.java:355)
           [jwsc] at java.lang.reflect.AccessibleObject.checkAccess(java.base@9-internal/AccessibleObject.java:347)
           [jwsc] at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:525)
           [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAp.parseArguments(WebServiceAp.java:174)
           [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAp.init(WebServiceAp.java:157)
           [jwsc] at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(jdk.compiler@9-internal/JavacProcessingEnvironment.java:671)
           [jwsc] at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(jdk.compiler@9-internal/JavacProcessingEnvironment.java:768)
           [jwsc] at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(jdk.compiler@9-internal/JavacProcessingEnvironment.java:859)
           [jwsc] at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2100(jdk.compiler@9-internal/JavacProcessingEnvironment.java:106)
           [jwsc] at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(jdk.compiler@9-internal/JavacProcessingEnvironment.java:1181)
           [jwsc] at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(jdk.compiler@9-internal/JavacProcessingEnvironment.java:1289)
           [jwsc] at com.sun.tools.javac.main.JavaCompiler.processAnnotations(jdk.compiler@9-internal/JavaCompiler.java:1229)
           [jwsc] at com.sun.tools.javac.main.JavaCompiler.compile(jdk.compiler@9-internal/JavaCompiler.java:903)
           [jwsc] at com.sun.tools.javac.main.Main.compile(jdk.compiler@9-internal/Main.java:261)
           [jwsc] at com.sun.tools.javac.main.Main.compile(jdk.compiler@9-internal/Main.java:143)
           [jwsc] at com.sun.tools.javac.Main.compile(jdk.compiler@9-internal/Main.java:73)
           [jwsc] at com.sun.tools.ws.ant.Apt.execute(Apt.java:568)
           [jwsc] :

            rgrigoriadi Roman Grigoriadi (Inactive)
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: