Unable to connect Dremio with JDBC Driver

Hi,
I try to connect Dremio with JDBC-Driver and I following Properties:
String JDBC_DRIVER = “com.dremio.jdbc.Driver”;
String DB_URL = “jdbc:dremio:direct=127.0.0.1:31010”;
String USER =“XXX”;
String PASS = “XXX”;

I try
Class.forName(JDBC_DRIVER);
DriverManager.getConnection(DB_URL, USER, PASS);

And get following Error:
java.lang.AbstractMethodError: com.dremio.jdbc.impl.DremioJdbc41Factory.newDatabaseMetaData(Loadd/org/apache/calcite/avatica/AvaticaConnection;)Loadd/org/apache/calcite/avatica/AvaticaDatabaseMetaData;
at oadd.org.apache.calcite.avatica.AvaticaConnection.(AvaticaConnection.java:95)
at com.dremio.jdbc.impl.DremioConnectionImpl.(DremioConnectionImpl.java:89)
at com.dremio.jdbc.impl.DremioJdbc41Factory.newConnection(DremioJdbc41Factory.java:72)
at com.dremio.jdbc.impl.DremioFactory.newConnection(DremioFactory.java:67)
at oadd.org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
at com.dremio.jdbc.Driver.connect(Driver.java:70)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at datev.eco.bdacc.Taxonomie.connections.SessionFactory.getConnection(SessionFactory.java:28)
at datev.eco.bdacc.Taxonomie.AppDremioExportCSV.main(AppDremioExportCSV.java:42)

Does anyone know how to solve this problem?
Thanks

Hi,

Have you check your application classpath? My guess is that you have both Dremio and Drill JDBC drivers and they are probably clashing over different version of a common library.

Hi Laurent,

That’s right.
I have both JDBC-Drivers in my project. I’ll delete the Drill-Driver and try again.

You’re right. It works super without the Drill Driver.

Thank you very mutch!

2 Likes

Glad it worked. We will also take some steps to avoid this conflict with the Apache Drill JDBC driver so you will be able to use both if you ever need it.