Forum Discussion
https://stackoverflow.com/questions/22659506/soapui-jdbc-connection-with-apache-cassandra
I have tried to use the code provided but I am having the following error message while trying to stablish the connection to cassandra:
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)
I got information from my DevTeam that this is a cassandra database uses a NATIVE PORT : 9042.
Does anybody have any more information about what might be the reason I am getting the error above?
Thanks for your help!
- gargantouas8 years agoOccasional Contributor
This is a connection using JDBC and not the core datastax drivers. Please open a new thread. pedro
Related Content
Recent Discussions
- 5 days ago
- 10 days ago