Hello fellow drill users,

I am using Drill 1.6 and DB2 on Linux Centos
I have tested that the drivers in the drill/jars/3rdparty are sufficient to 
connect to DB2 with a given password and username.

I am also  able to create a DB2 Storage Driver (seems drill validated the 
connection strings and user name and does a connection test while adding need 
to research this more)
{
  "type": "jdbc",
  "driver": "com.ibm.db2.jcc.DB2Driver",
  "url": "jdbc:db2://localhost:50000/SAMPLE",
  "username": "db2inst1",
  "password": "passwd",
  "enabled": false
}
But I get the following error
I tried to dig into the code it seems to happen even before calcite/drill hits 
the DB2 Data base. It happens when drill in recursing the"Schemas

2016-05-26 18:34:05,002 [28b8be63-62d0-0b7e-121e-a70535213c41:foreman] INFO  
o.a.drill.exec.work.foreman.Foreman - Query text for query id 
28b8be63-62d0-0b7e-121e-a70535213c41: use db2x
2016-05-26 18:34:05,031 [28b8be63-62d0-0b7e-121e-a70535213c41:foreman] ERROR 
o.a.drill.exec.work.foreman.Foreman - SYSTEM ERROR: NullPointerException: null 
key in entry: null=org.apache.calcite.jdbc.SimpleCalciteSchema@58fd7dd0


[Error Id: 3f20567b-5a85-45ac-81de-34799e1514fe on 
sandbox.hortonworks.com:31010]
org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: 
NullPointerException: null key in entry: 
null=org.apache.calcite.jdbc.SimpleCalciteSchema@58fd7dd0


[Error Id: 3f20567b-5a85-45ac-81de-34799e1514fe on 
sandbox.hortonworks.com:31010]
        at 
org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:543)
 ~[drill-common-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:744)
 [drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:862)
 [drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:794)
 [drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.common.EventProcessor.sendEvent(EventProcessor.java:73) 
[drill-common-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.work.foreman.Foreman$StateSwitch.moveToState(Foreman.java:796)
 [drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:913) 
[drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:262) 
[drill-java-exec-1.6.0.jar:1.6.0]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[na:1.7.0_95]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_95]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]
Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected 
exception during fragment initialization: null key in entry: 
null=org.apache.calcite.jdbc.SimpleCalciteSchema@58fd7dd0
        ... 4 common frames omitted
Caused by: java.lang.NullPointerException: null key in entry: 
null=org.apache.calcite.jdbc.SimpleCalciteSchema@58fd7dd0
        at 
com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:31)
 ~[guava-18.0.jar:na]
        at 
com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:135) 
~[guava-18.0.jar:na]
        at 
com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:282)
 ~[guava-18.0.jar:na]
        at 
com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:275)
 ~[guava-18.0.jar:na]
        at 
com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:206)
 ~[guava-18.0.jar:na]
        at 
org.apache.calcite.jdbc.SimpleCalciteSchema.getSubSchemaMap(SimpleCalciteSchema.java:121)
 ~[calcite-core-1.4.0-drill-r10.jar:1.4.0-drill-r10]
        at 
org.apache.calcite.jdbc.CalciteAbstractSchema$SchemaPlusImpl.getSubSchemaNames(CalciteAbstractSchema.java:200)
 ~[calcite-core-1.4.0-drill-r10.jar:1.4.0-drill-r10]
        at 
org.apache.drill.exec.store.StoragePluginRegistryImpl$DrillSchemaFactory.registerSchemas(StoragePluginRegistryImpl.java:399)
 ~[drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryContext.java:162) 
~[drill-java-exec-1.6.0.jar:1.6.0]
       at 
org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryContext.java:151) 
~[drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryContext.java:139) 
~[drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.ops.QueryContext.getNewDefaultSchema(QueryContext.java:125)
 ~[drill-java-exec-1.6.0.jar:1.6.0]
        at 
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:59)
 ~[drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:927) 
[drill-java-exec-1.6.0.jar:1.6.0]
        ... 3 common frames omitted

Any help is appreciated


I notice another user posting same questions a few months ago. Devender Yadav 
if you figured it out let me know
 
http://mail-archives.apache.org/mod_mbox/drill-user/201601.mbox/%3CCANiHXGE6+5jTiH8dFKFEc4L=zk6rm5-qb6qwao8c7-jas-j...@mail.gmail.com%3E

Regards
rohan

Reply via email to