scylladb / java-driver

ScyllaDB Java Driver for ScyllaDB and Apache Cassandra, based on the DataStax Java Driver
Apache License 2.0
56 stars 35 forks source link

NoSuchMethodError: com.datastax.driver.core.ResultSet.one()Lcom/datastax/driver/core/Row when updating to 3.11.5.x #306

Open FlorianHockmann opened 1 month ago

FlorianHockmann commented 1 month ago

We are using this driver for the Scylla backend of JanusGraph. For the Hadoop integration of JanusGraph, we still need to use version 3 of the driver. To be more precise, our dependency is on scylla-driver-core and we currently use version 3.11.2.4 there.

Dependabot has created a PR (JanusGraph/janusgraph#4464) to update the dependency, but some tests are now failing with a NoSuchMethodError:

Caused by: java.lang.NoSuchMethodError: 'com.datastax.driver.core.Row com.datastax.driver.core.ResultSet.one()'
        at org.apache.cassandra.hadoop.cql3.CqlInputFormat.describeSplits(CqlInputFormat.java:368)
        at org.apache.cassandra.hadoop.cql3.CqlInputFormat.getSubSplits(CqlInputFormat.java:345)
        at org.apache.cassandra.hadoop.cql3.CqlInputFormat$SplitCallable.call(CqlInputFormat.java:469)
        at org.apache.cassandra.hadoop.cql3.CqlInputFormat$SplitCallable.call(CqlInputFormat.java:450)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

We are using exactly the same code in another project of JanusGraph that is not specific for Scylla with the original driver in version 3.11.5. (To give some more background: JanusGraph has a general CQL backend where the original driver is used and then a Scylla backend which uses the same code but only switches the driver to this one.) Here, we don't have this problem. So, I would have expected version 3.11.5.x of this driver to work with the same code.

mykaul commented 1 month ago

90 changes between them - https://github.com/scylladb/java-driver/compare/3.11.2.4...3.11.5.3 - need to see what could have caused it.

Bouncheck commented 1 month ago

My vague recollection of this error message for this method is that there was some plugin checking backwards compatibility and it would sometimes complain even though nothing was changed. It may have been wrongly deleted just to satisfy that checker. If it truly is deleted we'll have to readd it and try to solve the problem with the plugin if that's what happened.

mykaul commented 1 month ago

@Bouncheck - https://github.com/scylladb/java-driver/commit/f54ec8c4567002b3be96224b662b6563d5041490 is probably the cause.