Forum Discussion

alejandrovargas's avatar
alejandrovargas
Occasional Contributor
9 years ago

Problem to connect SoapUi with Cassandra DB.

Hi,

 

I am trying to connect to Cassandra DB using JDBC step. The database is in a server, so I need to authentication to login (of course I have the user and password). I tried the connection using Datastax DevCenter and it works.

 

The problem is with the connection string (I think), I haved tried two options:

 

First option

Driver: org.apache.cassandra.cql.jdbc.CassandraDriver

Connection String: jdbc:cassandra://ip-address:port/tracking_system

 

error: Can't get the Connection for specified properties; java.sql.SQLSyntaxErrorException: InvalidRequestException(why:You have not logged in)

 

It was an expected error because I am not using user and password.

 

 

Second option

Driver: org.apache.cassandra.cql.jdbc.CassandraDriver

Connection String: jdbc:cassandra:user/password@ip-address:port/tracking_system

 

error: Can't get the Connection for specified properties; java.sql.SQLNonTransientConnectionException: Connection url must specify a host, e.g., jdbc:cassandra://localhost:9170/Keyspace1

 

¿Somebody knows how is the Connection string using user and password?

 

Thanks for your help in advance.

4 Replies

  • alejandrovargas's avatar
    alejandrovargas
    Occasional Contributor

    Hi, thanks for your answer.

     

    I read the article and I downloal again the jars. I continue with problem to connect, After searching more in Internet, I found this good blog with the string connection: 

    http://abhishekasthana.com/accessing-cassendra-soapui/

     

    Case 1:

    Connection String: jdbc:cassandra://username/password@servername:port/keyspacename_smallcase  (I was missing // before the user name)

     

    I get this error:

    Error: Can't get the Connection for specified properties; java.sql.SQLNonTransientConnectionException: Connection url may only include host, port, and keyspace, consistency and version option, e.g., jdbc:cassandra://localhost:9170/Keyspace1?version=3.0.0&consistency=ONE