Uploaded image for project: 'JBoss Marshalling'
  1. JBoss Marshalling
  2. JBMAR-214

Java 9: Illegal reflective access to create OptionalDataException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None

    Description

      JBoss Marshalling performs illegal reflective access to create an instance of java.io.OptionalDataException. This happens in org.jboss.marshalling.Marshalling#createOptionalDataException. We get the following warning in our logs

      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by org.jboss.marshalling.Marshalling$OptionalDataExceptionCreateAction$1 (file:/home/user/.m2/repository/org/jboss/marshalling/jboss-marshalling-osgi/1.4.10.Final/jboss-marshalling-osgi-1.4.10.Final.jar) to constructor java.io.OptionalDataException(boolean)
      WARNING: Please consider reporting this to the maintainers of org.jboss.marshalling.Marshalling$OptionalDataExceptionCreateAction$1
      

      Depending on the JVM options, this may already throw an exception Java 9.

      Oracle has stated that

      When deny becomes the default illegal-access mode then permit will likely remain supported for at least one release, so that developers can continue to migrate their code. The permit, warn, and debug modes will, over time, be removed, as will the --illegal-access option itself.

      http://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pmarscha Philippe Marschall (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: