Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The guava version is not compatible with spring-data-cassandra library #248

Open
JCL38-ORANGE opened this issue Sep 26, 2017 · 6 comments
Open

Comments

@JCL38-ORANGE
Copy link

Hello,

The last cassandra-unit release brings an upgrade to a most recent guava release.
...
com.google.guava
guava
21.0
...
This guava version is not compliant with the old cassandra datastax driver which is still included in the stable spring-data-cassandra framework (1.5.7).
https://jira.spring.io/browse/DATACASS-424
spring-projects/spring-boot#8809

I need to downgrade the guava version to 18.0 in order to use both cassandra-unit and spring-data-cassandra.
...
com.google.guava
guava
18.0
...
Regards,
Jean-Christophe.

@NYPD
Copy link

NYPD commented Feb 7, 2018

I guess this is something the user will have to exclude in the pom.xml.

@asarkar
Copy link

asarkar commented Jul 24, 2019

The cassandra-all library references classes that have been removed from Guava, for example com.google.common.base.CharMatcher.DIGIT. This causes runtime errors like

java.lang.NoClassDefFoundError: Could not initialize class org.apache.cassandra.io.sstable.format.SSTableFormat$Type

Filed CASSANDRA-15245

@t2y
Copy link

t2y commented Feb 17, 2020

In my environment, I could build using guava 25.1 without an error. But, the error occurred using guava 26.0.

implementation 'com.datastax.oss:java-driver-core:4.3.1'                      
testImplementation 'org.cassandraunit:cassandra-unit:4.3.1.0'                      
$ gradle --version
------------------------------------------------------------
Gradle 6.0.1
------------------------------------------------------------
Build time:   2019-11-18 20:25:01 UTC
Revision:     fad121066a68c4701acd362daf4287a7c309a0f5

Kotlin:       1.3.50
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.6 (Ubuntu 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OS:           Linux 5.3.0-28-generic amd64

@erwanJarno
Copy link

// https://docs.gradle.org/current/userguide/dependency_downgrade_and_exclude.html
testImplementation("org.cassandraunit:cassandra-unit-spring:4.3.1.0") {
    testImplementation("com.google.guava:guava") {
        version {
            // https://github.com/jsevellec/cassandra-unit/issues/248
            // https://issues.apache.org/jira/browse/CASSANDRA-15245
            strictly("18.0")
        }
    }
}

@nebulorum
Copy link

nebulorum commented Mar 1, 2021

Plus one to this issue but with Java 30.1-jre.

@asarkar
Copy link

asarkar commented May 21, 2021

This issue been open for almost 4 years, and the only workaround offered is to use an ancient Guava version? There's also another long standing ticket for supporting Java 11, which has been around for 3 years. The general vibe I get from using the cassandra-unit library is "we have created a library, thanks, $^% you very much".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants