doanduyhai / Achilles

An advanced Java Object Mapper/Query DSL generator for Cassandra
http://achilles.archinnov.info
Apache License 2.0
241 stars 92 forks source link

Exception on OpenJDK 15 #372

Closed dahankzter closed 3 years ago

dahankzter commented 3 years ago

I am getting the following exception when running on OpenJDK 15:

com.datastax.driver.core.exceptions.ServerError: An unexpected error occurred server side on /127.0.0.1:9142: java.lang.UnsupportedOperationException: can't get field offset on a hidden class: private final org.apache.cassandra.db.ClusteringComparator org.apache.cassandra.db.ClusteringComparator$$Lambda$185/0x0000000800d96f20.arg$1
at com.datastax.driver.core.exceptions.ServerError.copy(ServerError.java:62)
at com.datastax.driver.core.exceptions.ServerError.copy(ServerError.java:26)
at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:35)
at com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:86)

It does not happen when I run against a downloaded Cassandra using the same Java 15 JVM version but only in our test suite and using Java 14 work just fine.

doanduyhai commented 3 years ago

Humm, I don't think neither Achilles nor the Java driver 3.x version do support Java 15...

doanduyhai commented 3 years ago

Looking at the exception, it seems that the Java driver is trying to get some hidden field. Although allowed from earlier versions of Java, this feature may be disabled for Java 15

shoomi commented 1 year ago

I had the same error (Java 15) when trying to prepare statement in my test using cqlSession from EmbeddedCassandraServerHelper. Like: cqlSession = EmbeddedCassandraServerHelper.getSession(); But what interesting, everything works fine (with the same Java 15 version) when I connect a session to my local cassandra on port 9042. When I downgraded the Java version to 14, - the test worked.