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

[Java] Integration test fails with UnsupportedOperationException

    XMLWordPrintableJSON

    Details

      Description

      Running the java integration test fails with an exception:

      $ java -classpath ~/arrow/java/tools/target/arrow-tools-0.14.0-SNAPSHOT-jar-with-dependencies.jar -Dio.netty.tryReflectionSetAccessible=false org.apache.arrow.tools.Integration -a ~/tmp/1832930b_simple.json_as_file -j ~/arrow/integration/data/simple.json -c VALIDATE
      
      ...
      
      Incompatible files
      sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not available
      08:55:43.597 [main] ERROR org.apache.arrow.tools.Integration - Incompatible files
      java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not available
      	at io.netty.util.internal.PlatformDependent.directBuffer(PlatformDependent.java:399)
      	at io.netty.buffer.NettyArrowBuf.getDirectBuffer(NettyArrowBuf.java:233)
      	at io.netty.buffer.NettyArrowBuf.nioBuffer(NettyArrowBuf.java:223)
      	at io.netty.buffer.ArrowBuf.nioBuffer(ArrowBuf.java:245)
      	at org.apache.arrow.vector.ipc.message.ArrowRecordBatch.computeBodyLength(ArrowRecordBatch.java:211)
      	at org.apache.arrow.vector.ipc.message.MessageSerializer.serialize(MessageSerializer.java:175)
      	at org.apache.arrow.vector.ipc.ArrowWriter.writeRecordBatch(ArrowWriter.java:119)
      	at org.apache.arrow.vector.ipc.ArrowFileWriter.writeRecordBatch(ArrowFileWriter.java:61)
      	at org.apache.arrow.vector.ipc.ArrowWriter.writeBatch(ArrowWriter.java:107)
      	at org.apache.arrow.tools.Integration$Command$2.execute(Integration.java:171)
      	at org.apache.arrow.tools.Integration.run(Integration.java:118)
      	at org.apache.arrow.tools.Integration.main(Integration.java:69)
      

      Looking through netty's source, it looks like this exception is emitted here.

      $ apt search jdk | grep installed
      default-jre/bionic-updates,bionic-security,now 2:1.11-68ubuntu1~18.04.1 amd64 [installed,automatic]
      default-jre-headless/bionic-updates,bionic-security,now 2:1.11-68ubuntu1~18.04.1 amd64 [installed,automatic]
      libslf4j-java/bionic,bionic,now 1.7.25-3 all [installed,automatic]
      openjdk-11-jdk/bionic-updates,bionic-security,now 11.0.3+7-1ubuntu2~18.04.1 amd64 [installed]
      openjdk-11-jdk-headless/bionic-updates,bionic-security,now 11.0.3+7-1ubuntu2~18.04.1 amd64 [installed,automatic]
      openjdk-11-jre/bionic-updates,bionic-security,now 11.0.3+7-1ubuntu2~18.04.1 amd64 [installed,automatic]
      openjdk-11-jre-headless/bionic-updates,bionic-security,now 11.0.3+7-1ubuntu2~18.04.1 amd64 [installed,automatic]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bryanc Bryan Cutler
                Reporter:
                bkietz Ben Kietzman
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m