Reputation: 1
Unable to connect Cassandra using jdbc driver getting error java.sql.SQLException: Cannot create PoolableConnectionFactory (isValid() returned false)
Apache beam JDBC IO not working with Casandra I tried with working cassandra-jdbc-1.2.5.jar
Here my pom
<dependency>
<groupId>org.apache-extras.cassandra-jdbc</groupId>
<artifactId>cassandra-jdbc</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-thrift -->
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-thrift</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-clientutil -->
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-clientutil</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.9.3</version>
</dependency>
i did JDBC io using SQL and Oracle also but not working with Cassandra
input.getPipeline().apply(JdbcIO.<Row>read().withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create("org.apache.cassandra.cql.jdbc.CassandraDriver", "jdbc:cassandra://112.155.0.88:9160/beam")
.withUsername(username).withPassword(password))
.withQuery("Select personname from person"))
.withCoder(SchemaCoder.of(schema))
.withRowMapper((JdbcIO.RowMapper<Row>) resultSet -> {
}
and getting this error java.sql.SQLException: Cannot create PoolableConnectionFactory (isValid() returned false) im wondering if it is supported by beam or not.
Upvotes: 0
Views: 289