Cassandra Connection with Groovy Script In SoapUI
Dear Community, thanks for the time. I am trying to access a remote Cassandra DB in order to complete my assertions. I see that the Server is running: Cassandra V 3.0.8.1293 Driver Type: Cassandra CQL Datastax Java Driver for Apache Cassandra - Core [3.0.5] So, I am trying with the following code to access the DB import com.datastax.driver.core.* Cluster cluster = null; try { cluster = Cluster.builder().addContactPoint("x.x.x.x").withCredentials("xxxxxxx", "xxxxxx").withPort(9042).build() Session session = cluster.connect(); ResultSet rs = session.execute("select * from TABLE"); Row row = rs.one(); } finally { if (cluster != null) cluster.close(); } when I use the cassandra-driver-core-2.0.1.jar I am getting the error : ERROR:com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /x.x.x.x(null)) Read the documentation and a lot of posts here and on other blogs and I saw that there may be an incompatibility with the driver version so I tried to upgrade the driver to many versions (cassandra-driver-core-2.5,cassandra-driver-core-3,cassandra-driver-core-3.2), but on that I am getting the following: ERROR:java.lang.ExceptionInInitializerError Have also tried to connect using JDBC, but to no avail. using the configuration proposed at this thread https://community.smartbear.com/t5/SoapUI-NG/Apache-Cassandra-CQL-jdbc-connection/td-p/40050 Actually I am running out of ideas. Can anyone propose or point to some direction on how to actually achieve this, either by pointing me to some tutorial or any idea. Thank you very much3.3KViews0likes4Comments