Closed ThePickNick closed 5 years ago
Have you tried with java.sql.DriverManager.registerDriver(new com.github.mmolimar.ksql.jdbc.KsqlDriver)
?
Getting the same error as ThePickNick; however, I'm getting it out of RazorSQL when trying to use the driver to query my ksql server, any ideas?
Same when using the produced driver jar in Intellij:
Its most likely because the produced jar is not a fat-jar, i.e. is missing the internal dependencies of the driver. Not sure hot to fix that, because it's done in sbt.
@ThePickNick, you may have to add the dependencies to your project. If you are using maven, it would be these two deps:
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.11</version>
</dependency>
<dependency>
<groupId>io.confluent.ksql</groupId>
<artifactId>ksql-rest-app</artifactId>
<version>4.1.0</version>
</dependency>
Can you try with the new version? Build the jar executing sbt clean assembly
.
I've tried with the fat-version of the current master, and the noclassdef error seems fixed.
Great!
Hello I tried to test the driver out but When compiling the source "sbt compile" and try to run it "sbt run" to test I get Java.lang.runtimeExpection: no main class detected
when I package the code and try to run the simple Java app I get error with using the driver
Class.forname("com.github.mmolimar.ksql.jdbc.ksqldriver");
Exception in thread "main" Java.lang.NoClassDefFoundError: scala/ Function1 At java.lang.class.forname0(native method) At java.lang.class.forname(unknown source) ...
Did anyone stumble on similar issue and knows how to overcome it?
Thank you.