Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-16472

[Java] InaccessibleObjectException when using JDK16+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 4.0.0
    • None
    • Java
    • None

    Description

      Caused by: java.lang.ExceptionInInitializerError
          at org.apache.arrow.memory.ArrowBuf.setZero(ArrowBuf.java:1161)
          at org.apache.arrow.vector.BaseFixedWidthVector.reAlloc(BaseFixedWidthVector.java:446)
          at org.apache.arrow.vector.BaseFixedWidthVector.handleSafe(BaseFixedWidthVector.java:836)
          at org.apache.arrow.vector.DecimalVector.setSafe(DecimalVector.java:446)
          at net.snowflake.ingest.streaming.internal.ArrowRowBuffer.convertRowToArrow(ArrowRowBuffer.java:698)
          at net.snowflake.ingest.streaming.internal.ArrowRowBuffer.insertRows(ArrowRowBuffer.java:282)
          ... 3 more
      Caused by: java.lang.RuntimeException: Failed to initialize MemoryUtil.
          at org.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:136)
          ... 9 more
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @24105dc5
          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:180)
          at java.base/java.lang.reflect.Field.setAccessible(Field.java:174)
          at org.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:84)
          ... 9 more

       

      It could be work around by adding --add-opens=java.base/java.nio=ALL-UNNAMED to the JVM option, but I'm wondering we could have a better fix

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tzhang ZHUO ZHANG
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: