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

AccessorInjector optimization in JAXB needs to be re-examined

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: xml
    • Labels:
    • Subcomponent:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ljungman Lukáš Jungmann
                Reporter:
                sfelts Stephen Felts
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: