Forum Discussion
abhishek813
Frequent Contributor
I hope its not too late but i was able to access Cassandra from soapUIs groovy test step.
The below short piece of code does the job but to be able to use this code you should have certain jars (see attached image) in the ext folder.
For anyone interested, i have written a blog about this too at http://abhishekasthana.com/accessing-cassendra-soapui/.
The below short piece of code does the job but to be able to use this code you should have certain jars (see attached image) in the ext folder.
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://localhost:9160/soapuikeyspace"); //keyspace has to be in lowercase
def stmt = con.createStatement();
//add data
def qry = "insert into users (user_id, lname, fname) values (1747,'Abhishek','Asthana');"
def rs = stmt.executeUpdate(qry)
For anyone interested, i have written a blog about this too at http://abhishekasthana.com/accessing-cassendra-soapui/.
JahnaviAkkineni
8 years agoOccasional Contributor
I tried using the script posted and I am seeing the same error as well. No suitable driver for jdbc:cassandra
Related Content
- 6 years ago
- 10 years ago
- 4 years ago
Recent Discussions
- 23 days ago