aws / aws-sigv4-auth-cassandra-java-driver-plugin

A SigV4 authentication plugin for the open-source DataStax Java Driver for Apache Cassandra. Allows use of AWS IAM users and roles for direct authentication.
Apache License 2.0
13 stars 14 forks source link

Error: java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; #5

Closed tuzzmaniandevil closed 4 years ago

tuzzmaniandevil commented 4 years ago

I'm getting the following error when trying to use this package with OpenJDK 8

Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
    at software.aws.mcs.auth.SigV4AuthProvider.<clinit>(SigV4AuthProvider.java:72)
tuzzmaniandevil commented 4 years ago

This seems to be a common issue: https://github.com/snazy/ohc/issues/70 Seems to be caused when the jar is compiled with JDK9+. I cloned the repo and compiled it with JDK8 and the issue went away.

dchenbec commented 4 years ago

Thank you for the report, we are investigating

dchenbec commented 4 years ago

Unfortunately we cannot deploy a fixed version of 4.0.0 because Maven considers releases immutable and remote repositories may not pick up the change. Instead, please use the 4.0.1 version of the plugin, which we have confirmed is built with JDK8.

tuzzmaniandevil commented 4 years ago

@dchenbec Thanks for fixing it so quickly. A new version is ok :-)

dchenbec commented 4 years ago

For anyone finding this in the future, we found another bug related to JDK8 -> JDK11 breaking API changes that has been fixed in 4.0.2