0
votes

I am trying to use drill in embedded mode under windows. But I am having the following error:

> sqlline.bat -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
Calculating HADOOP_CLASSPATH ...
HBASE_HOME not detected...
Calculating Drill classpath...
java.lang.NullPointerException
apache drill 1.13.0
"a drill is a terrible thing to waste"
0: jdbc:drill:zk=local>
0: jdbc:drill:zk=local>
0: jdbc:drill:zk=local>
0: jdbc:drill:zk=local> show tables;
No current connection
0: jdbc:drill:zk=local>

You can see there is no current connection and also the web console does not work either. Thanks

Edit: Add log file content.

2018-05-31 03:44:27,981 [main] INFO o.a.drill.common.config.DrillConfig - Configuration and plugin file(s) identified in 115ms. Base Configuration: - jar:file:/C:/apache-drill-1.13.0/jars/drill-common-1.13.0.jar!/drill-default.conf

Intermediate Configuration and Plugin files, in order of precedence: - jar:file:/C:/apache-drill-1.13.0/jars/drill-storage-kafka-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-opentsdb-storage-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-hive-exec-shaded-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-java-exec-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-storage-hbase-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-kudu-storage-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-logical-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-jdbc-storage-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-mongo-storage-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-gis-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-memory-base-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-common-1.13.0.jar!/drill-module.conf - jar:file:/C:/apache-drill-1.13.0/jars/drill-storage-hive-core-1.13.0.jar!/drill-module.conf

Override File: file:/C:/apache-drill-1.13.0/conf/drill-override.conf Overridden Properties: -user = -password = -zk = local

2018-05-31 03:44:28,278 [main] WARN o.a.drill.exec.util.GuavaPatcher - Unable to patch Guava classes. javassist.CannotCompileException: by java.lang.LinkageError: loader (instance of sun/misc/Launcher$AppClassLoader): attempted duplicate class definition for name: "com/google/common/base/Stopwatch" at javassist.ClassPool.toClass(ClassPool.java:1099) ~[javassist-3.16.1-GA.jar:na] at javassist.ClassPool.toClass(ClassPool.java:1042) ~[javassist-3.16.1-GA.jar:na] at javassist.ClassPool.toClass(ClassPool.java:1000) ~[javassist-3.16.1-GA.jar:na] at javassist.CtClass.toClass(CtClass.java:1140) ~[javassist-3.16.1-GA.jar:na] at org.apache.drill.exec.util.GuavaPatcher.patchStopwatch(GuavaPatcher.java:66) ~[drill-java-exec-1.13.0.jar:1.13.0] at org.apache.drill.exec.util.GuavaPatcher.patch(GuavaPatcher.java:36) ~[drill-java-exec-1.13.0.jar:1.13.0] at org.apache.drill.exec.server.Drillbit.(Drillbit.java:69) [drill-java-exec-1.13.0.jar:1.13.0] at org.apache.drill.jdbc.impl.DrillConnectionImpl.(DrillConnectionImpl.java:134) [drill-jdbc-1.13.0.jar:1.13.0] at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:73) [drill-jdbc-1.13.0.jar:1.13.0] at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69) [drill-jdbc-1.13.0.jar:1.13.0] at org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:138) [avatica-1.10.0.jar:1.10.0] at org.apache.drill.jdbc.Driver.connect(Driver.java:72) [drill-jdbc-1.13.0.jar:1.13.0] at sqlline.DatabaseConnection.connect(DatabaseConnection.java:168) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:214) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.Commands.connect(Commands.java:1083) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.Commands.connect(Commands.java:1015) [sqlline-1.1.9-drill-r7.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171] at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.dispatch(SqlLine.java:742) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.initArgs(SqlLine.java:528) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.begin(SqlLine.java:596) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.start(SqlLine.java:375) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.main(SqlLine.java:268) [sqlline-1.1.9-drill-r7.jar:na] Caused by: java.lang.LinkageError: loader (instance of sun/misc/Launcher$AppClassLoader): attempted duplicate class definition for name: "com/google/common/base/Stopwatch" at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_171] at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[na:1.8.0_171] at java.lang.ClassLoader.defineClass(ClassLoader.java:642) ~[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171] at javassist.ClassPool.toClass2(ClassPool.java:1112) ~[javassist-3.16.1-GA.jar:na] at javassist.ClassPool.toClass(ClassPool.java:1093) ~[javassist-3.16.1-GA.jar:na]

1
what version of drill is this? Also can you provide the stack trace of the NullPointerException? It is probably in the drillbit.logilooner
I used 1.13.0, which is the current most recent version. I added the content from log file.Bo Qiang
Thanks for the info. Is that everything in the log? I was expecting to see NullPointerException somewhere in there.ilooner
that is an excerpt from the sqlline.log file. The entire file is too long that stackoverflow does not let me to post. However, other parts of the file do not seem to contain error messages.Bo Qiang
Hmm I don't know what's going wrong :(. A lot of Drill developers and users are active on the Drill mailing lists. Could you subscribe to the user list and post your question there? The odds are better that someone will see your question there. See drill.apache.org/mailinglistsilooner

1 Answers

3
votes

You have incompatible Guava version with Drill's one in your HADOOP_CLASSPATH. You can find similar issues here: DRILL-4931, DRILL-4928

Try to exclude Guava jars from your HADOOP_CLASSPATH or just unset it by:
~$unset HADOOP_CLASSPATH

This issue should be resolved after merging PR for DRILL-6422