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

AccessorInjector optimization in JAXB needs to be re-examined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • None
    • None
    • xml

      Jigsaw restricts setAccessible across module boundaries.

      We are seeing the following stack trace.

           [java] [carbgen] java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @3b5fad2d
           [java] [carbgen] at java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:424)
           [java] [carbgen] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:198)
           [java] [carbgen] at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:192)
           [java] [carbgen] at java.base/java.lang.reflect.Method.setAccessible(Method.java:186)
           [java] [carbgen] at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.getMethod(Injector.java:184)

      This is the standalone version (the JDK version is in a different package). This is solved for the JDK version but it's not in the standalone version yet.

            ljungman Lukáš Jungmann
            sfelts Stephen Felts (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: