Forum Discussion
I trying to connect to Cassandra database, I have all the dependencies in the bin/ext folder for ready api. When connecting to the cassandra, I getting the following error " Can't get the Connection for specified properties; java.sql.SQLNonTransientConnectionException: Keyspace names must be composed of alphanumerics and underscores (parsed: 'cassandra@localhost:9042/demo23_123') " even though i have keyspace name as suggested.
I did try to connect with groovy script as well. Did get the same error
here is the code for grovvy script
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://cassandra/cassandra@localhost:9042/demo23_123"); //keyspace has to be in lowercase
def stmt = con.createStatement();
//add data
def qry = "select * from patient"
def rs = stmt.executeUpdate(qry);
Request to suggest to continue this R&D activity.
Thanks
Raghu Raghavan
Hi Raghu,
Were you able to connect to cassandra using SOAP UI?
Related Content
- 6 years ago
- 10 years ago
- 3 years ago
Recent Discussions
- 5 days ago
- 10 days ago