Replies: 4 comments 2 replies
-
Hello @articlaus Could you please provide more details about the context of execution (Java version, used framework if any, the code executing the call to the JDBC API, ...)? |
Beta Was this translation helpful? Give feedback.
-
Hi @articlaus It looks like there is a dependency conflict with the Cassandra Java driver. You can try this:
Another possibility is that Spring Boot Data Cassandra Reactive has a custom class loader and some classes are not visible from some parts of your code at runtime (this is an hypothesis, I didn't check if it's really the case). Also, I don't have the view of the whole project, but it's quite strange to import By the way, your code could also be simplified:
public void updateStatus(DataDTO status) {
try (CassandraConnection connection = new CassandraConnection(cqlSession, keyspace, ConsistencyLevel.ALL, false, null, null)) {
final CassandraPreparedStatement statement = connection.prepareStatement(
"INSERT INTO data_status (id,index,trace_id,status,pub_status,source_type,last_change_ts,userid) VALUES (?,?,?,?,?,?,?,?)"
);
statement.setObject(1, status.getPrimaryKey().id());
//...
statement.setString(8, status.getUserId());
statement.executeQuery();
} catch (Exception ex) {
log.error("Exception Occurred while trying to batch insert for status update into Cassandra", ex);
throw new CustomException(ex.getMessage());
}
} |
Beta Was this translation helpful? Give feedback.
-
@maximevw
and i tried adding Wrapper codecs to session building still fails with same exception.
even then the above WARN, gets printed constantly |
Beta Was this translation helpful? Give feedback.
-
@maximevw |
Beta Was this translation helpful? Give feedback.
-
Hi, jdbc insertion is failing with below error, i am not sure what seems to be causing it
Beta Was this translation helpful? Give feedback.
All reactions