Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-8246 Java 11/17 Support and Testing
  3. HDDS-10123

InaccessibleObjectException in tests using ChecksumByteBufferImpl with Java 17

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • test

    Description

      Unit/integration tests need the same add-opens added for HDDS-7228 in bin/ozone, to prevent:

      java.lang.ExceptionInInitializerError
      	at org.apache.hadoop.ozone.common.TestChecksumImplsComputeSameValues.testCRC32CImplsMatch(TestChecksumImplsComputeSameValues.java:66)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
      	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field boolean java.nio.ByteBuffer.isReadOnly accessible: module java.base does not "opens java.nio" to unnamed module @75eeccf5
      	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
      	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
      	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
      	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
      	at org.apache.hadoop.ozone.common.ChecksumByteBufferImpl.<clinit>(ChecksumByteBufferImpl.java:44)
      	... 4 more
      

      (and similar in some other tests)

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: