Groovy - Cassandra Connection using core datastax drivers not JDBC
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Groovy - Cassandra Connection using core datastax drivers not JDBC
I have tried to use JDBC connection string but I am having the following error message while trying to establish the connection to cassandra but as I have a native port cassandra set up
Can anyone help on USING core datastax drivers INSTEAD JDBC connection?
Code (JDBC not working with my cassandra setup):
import java.sql.DriverManager;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.Statement;
import javax.sql.DataSource;
import org.apache.cassandra.cql.jdbc.*;
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("org.apache.cassandra.cql.jdbc.CassandraDriver");
def con = DriverManager.getConnection("jdbc:cassandra://IP_ADDRESS:9042/activation"); //keyspace has to be in lowercase
def stmt = con.createStatement();
//add data
def qry = "SELECT * fROM activation WHERE activation_id = '001010126' and activation_N_id ='01';"
def rs = stmt.executeUpdate(qry)
ERRROR MESSAGE
java.sql.SQLExeption: Incorrect URL: jdbc:cassandra...
(Image Attached)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is your connection string correct.
Does not sound like an issue with JDBC
https://stackoverflow.com/questions/30743272/what-is-the-connection-url-to-be-used-for-cassandra
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@pedro Are u able to connect to Cassandra from SoapUI. I am using Cassandra 3.0.12.1586 | DSE 5.0.7 |
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://stackoverflow.com/questions/46674990/connecting-to-cassandra-through-soapui/46676742#4667674...
Regards,
Rao.
