mmolimar / ksql-jdbc-driver

JDBC driver for Apache Kafka
Apache License 2.0
87 stars 19 forks source link

No suitable driver found error during the loading class #22

Open deveshdashora opened 4 years ago

deveshdashora commented 4 years ago

Hi,

I am developing a simple JDBC program to use this as JDBC driver and I am facing below issue:

I am able connect to ksqlDB when I am loading the driver using the code snippet below. java.sql.DriverManager.registerDriver(new com.github.mmolimar.ksql.jdbc.KsqlDriver)

But while using the snippet below, it is providing error as "No suitable driver found for jdbc:ksql://xxx.com:8088/".

Class.forName("com.github.mmolimar.ksql.jdbc.KsqlDriver") connection = DriverManager.getConnection("jdbc:ksql://xxx:8088");

Also when I am trying to use the driver in Kafka Connect via JDBC connector (from another Kafka cluster to ksqlDB), then there also facing the same issue.

It will be great help to have a solution for this issue.

Regards! Devesh

mmolimar commented 4 years ago

Hi. The classpath is properly set with the driver and its dependencies? Which JDK are you using?