Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5256

Exception in thread "main" java.lang.ExceptionInInitializerError

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.0, 1.8.0
    • Fix Version/s: None
    • Component/s: Client - JDBC
    • Labels:
    • Environment:

      Windows 7, IBM SDK 1.6 and IBM SDK 1.7

      Description

      Below error while connecting to Drill Server

      Exception in thread "main" java.lang.ExceptionInInitializerError

      at java.lang.J9VMInternals.initialize(J9VMInternals.java:257)

      at oadd.org.apache.drill.exec.memory.BaseAllocator.<clinit>(BaseAllocator.java:44)

      at java.lang.J9VMInternals.initializeImpl(Native Method)

      at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)

      at java.lang.J9VMInternals.initialize(J9VMInternals.java:202)

      at oadd.org.apache.drill.exec.memory.RootAllocatorFactory.newRoot(RootAllocatorFactory.java:38)

      at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:143)

      at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:64)

      at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)

      at oadd.net.hydromatic.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:126)

      at org.apache.drill.jdbc.Driver.connect(Driver.java:72)

      at java.sql.DriverManager.getConnection(DriverManager.java:583)

      at java.sql.DriverManager.getConnection(DriverManager.java:245)

      at com.trianz.drill.ApacheDrillDemo.main(ApacheDrillDemo.java:13)

      Caused by: java.lang.NullPointerException

      at oadd.io.netty.buffer.PooledByteBufAllocatorL$InnerAllocator.<init>(PooledByteBufAllocatorL.java:93)

      at oadd.io.netty.buffer.PooledByteBufAllocatorL.<init>(PooledByteBufAllocatorL.java:56)

      at oadd.org.apache.drill.exec.memory.AllocationManager.<clinit>(AllocationManager.java:60)

      at java.lang.J9VMInternals.initializeImpl(Native Method)

      at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)

      ... 13 more

      When I tried to debug in to source code, following is the place where we are getting NULL POINTER EXCEPTION

      drill/exec/memory/base/src/main/java/io/netty/buffer/PooledByteBufAllocatorL.java

      Line: 93: this.chunkSize = directArenas[0].chunkSize;

      Below is the code snapshot.

      public InnerAllocator() {
      super(true);

      try

      { Field f = PooledByteBufAllocator.class.getDeclaredField("directArenas"); f.setAccessible(true); this.directArenas = (PoolArena<ByteBuffer>[]) f.get(this); }

      catch (Exception e)

      { throw new RuntimeException("Failure while initializing allocator. Unable to retrieve direct arenas field.", e); }

      this.chunkSize = directArenas[0].chunkSize;

      if (memoryLogger.isTraceEnabled()) {

      Can anyone please help on this? Thanks in advance.

      Thanks,
      Vasu T

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              thadakavasu Vasu
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: