We are assessing DataStax Astra and want to use a JDBC driver for our tests that is capable of connecting to Astra as well as local test cassandra DB. The Simba JDBC driver listed at https://downloads.datastax.com/#odbc-jdbc-drivers seem like a good candidate. However following the documentation (https://docs.datastax.com/en/driver-matrix/doc/latestSimbaCassJDBCDriver.html), the simplest method of creating a DataSource doesn't work. This sample code from the doc -
Connection connection = null; DataSource ds = new com.simba.cassandra.jdbc42.DataSource(); ds.setURL("jdbc:cassandra://localhost:57668;DefaultKeyspace=runtime;AuthMech=1"); connection = ds.getConnection();
Fails with -
Exception in thread "main" java.sql.SQLException: Error creating Driver, Driver class name incorrect. at com.simba.cassandra.jdbc.common.AbstractDataSource.doInitialize(Unknown Source) at com.simba.cassandra.jdbc.common.AbstractDataSource.getSimbaConnection(Unknown Source) at com.simba.cassandra.jdbc.common.AbstractDataSource.getConnection(Unknown Source) at com.sample.App1.main(App1.java:14) Caused by: com.simba.cassandra.support.exceptions.GeneralException: Error creating Driver, Driver class name incorrect. at com.simba.cassandra.dsi.core.impl.DSIDriverFactory.createDriver(Unknown Source) ... 4 more Caused by: java.lang
Is there anything in particular I am missing? Just to note, we use a library that needs a DataSource to be passed in as an argument. The other option of connecting using a DriverManager is not an option for us.