jsevellec / cassandra-unit

Utility tool to load Data into Cassandra to help you writing good isolated JUnit Test into your application
GNU Lesser General Public License v3.0
424 stars 1 forks source link

Upgrade hibernate-validator #320

Open asarkar opened 4 years ago

asarkar commented 4 years ago

cassandra-unit brings in org.hibernate:hibernate-validator:4.3.0.Final, which was last used when dinosaurs roamed the earth 😄. Any recent project, like Spring Boot, wants newer versions, and there is a runtime error.

Caused by: java.lang.AbstractMethodError: Receiver class org.hibernate.validator.internal.engine.ConfigurationImpl does not define or inherit an implementation of the resolved method abstract getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider; of interface javax.validation.Configuration.
nikeee commented 2 years ago

I'm currently blocked by this issue. Anything I can do to resolve this?

asarkar commented 2 years ago

@nikeee This projects appears to be unmaintained. Fork your own?

nikeee commented 2 years ago

@asarkar We're currently evaluating migrating to this project: https://github.com/nosan/embedded-cassandra-spring-boot-starter

Saif-Haider commented 2 years ago

try adding this `

org.hibernate
<artifactId>hibernate-validator</artifactId>
<version>6.0.13.Final</version>

`

asarkar commented 2 years ago

@Saif-Haider Did you read above that there's a runtime error when a newer version is added?

nikeee commented 2 years ago

That old dependency is a transitive dependency of cassandra:

$ mvn dependency:tree
...
[INFO] +- org.apache.cassandra:cassandra-all:jar:3.11.5:compile
[INFO] |  +- org.xerial.snappy:snappy-java:jar:1.1.1.7:compile
[INFO] |  +- net.jpountz.lz4:lz4:jar:1.3.0:compile
[INFO] |  +- com.ning:compress-lzf:jar:0.8.4:compile
[INFO] |  +- com.google.guava:guava:jar:18.0:compile
[INFO] |  +- commons-cli:commons-cli:jar:1.1:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.9:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] |  +- org.apache.commons:commons-math3:jar:3.2:compile
[INFO] |  +- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4:compile
[INFO] |  +- org.antlr:antlr:jar:3.5.2:compile
[INFO] |  |  \- org.antlr:ST4:jar:4.0.8:compile
[INFO] |  +- org.antlr:antlr-runtime:jar:3.5.2:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.7:compile
[INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:compile
[INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:compile
[INFO] |  +- com.googlecode.json-simple:json-simple:jar:1.1:compile
[INFO] |  +- com.boundary:high-scale-lib:jar:1.0.6:compile
[INFO] |  +- org.yaml:snakeyaml:jar:1.11:compile
[INFO] |  +- org.mindrot:jbcrypt:jar:0.3m:compile
[INFO] |  +- io.airlift:airline:jar:0.6:compile
[INFO] |  |  \- javax.inject:javax.inject:jar:1:compile
[INFO] |  +- io.dropwizard.metrics:metrics-core:jar:3.1.5:compile
[INFO] |  +- io.dropwizard.metrics:metrics-jvm:jar:3.1.5:compile
[INFO] |  +- com.addthis.metrics:reporter-config3:jar:3.0.3:compile
[INFO] |  |  +- com.addthis.metrics:reporter-config-base:jar:3.0.3:compile
[INFO] |  |  \- org.hibernate:hibernate-validator:jar:4.3.0.Final:compile
...

So updating cassandra might solve the issue.

Edit: Updating org.apache.cassandra:cassandra-all to 3.11.11 removes that library from the transitive dependencies. Going to v4 would likely resolve this issue, too (#325 would resolve this issue).