cassandradatastax-java-driver

Is the Cassandra Java driver compatible with JDK 21?


Is the cassandra java driver 4.17 compatible with jdk 21? We are planning to migrate our servers to java 21 and we are using cassandra client. If this is not supported this is a no go for us.

There are some mixed signals available on provider side. In the compatibility section: https://docs.datastax.com/en/developer/java-driver/4.17/index.html It is stated that driver requires Java 8 or higher.

But on the upgrade guide page: https://docs.datastax.com/en/developer/java-driver/4.17/upgrade_guide/index.html we have an information that there is beta support for Java17.

I already tried running cassandra java driver 4.17 against jdk 21 and it seems to work. But I would like to know if it is safe to use that configuration on production.


Solution

  • The Java driver for Cassandra is compatible with Java 21. We are aware of several enterprises that build new apps on Java 21 as the default.

    It's been a year since the testing infrastructure was updated to use Java 17 (JAVA-3042) and I'm not aware of issues reported by developers so we should probably remove the beta flag on it.

    For what it's worth, I've logged CASSANDRA-19936 to request using Java 21 in the testing infrastructure. In the meantime, please let the project know if you run into issues with Java 21 so we could investigate. Cheers!