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

Exclude jcl-over-slf4j in favor of Spring Framework's spring-jcl #1191

Closed
wilkinsona opened this issue Nov 12, 2021 · 7 comments
Closed

Exclude jcl-over-slf4j in favor of Spring Framework's spring-jcl #1191

wilkinsona opened this issue Nov 12, 2021 · 7 comments
Assignees
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@wilkinsona
Copy link
Member

To avoid having two different variants of the org.apache.commons.logging classes on the classpath, jcl-over-slf4j should be excluded as a transitive dependency. It's present at the moment as it's a transitive dependency of com.datastax.oss:java-driver-core.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 12, 2021
@mp911de mp911de added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 15, 2021
@mp911de mp911de self-assigned this Nov 15, 2021
@mp911de
Copy link
Member

mp911de commented Nov 15, 2021

Thanks for bringing this up. We have also other places like MongoDB and JPA that use mixed logging strategies and we need to clean up all of these to use Spring's JCL.

@mp911de
Copy link
Member

mp911de commented Nov 15, 2021

Care to help me understand which dependency you want to exclude? According to mvn dependency:tree, there's no jcl-over-slf4j:

[INFO] org.example:untitled:jar:1.0-SNAPSHOT
[INFO] \- org.springframework.data:spring-data-cassandra:jar:3.3.0:compile
[INFO]    +- org.springframework:spring-context:jar:5.3.13:compile
[INFO]    |  \- org.springframework:spring-aop:jar:5.3.13:compile
[INFO]    +- org.springframework:spring-beans:jar:5.3.13:compile
[INFO]    +- org.springframework:spring-core:jar:5.3.13:compile
[INFO]    |  \- org.springframework:spring-jcl:jar:5.3.13:compile
[INFO]    +- org.springframework:spring-tx:jar:5.3.13:compile
[INFO]    +- org.springframework:spring-expression:jar:5.3.13:compile
[INFO]    +- org.springframework.data:spring-data-commons:jar:2.6.0:compile
[INFO]    +- com.datastax.oss:java-driver-core:jar:4.13.0:compile
[INFO]    |  +- com.datastax.oss:native-protocol:jar:1.5.0:compile
[INFO]    |  +- io.netty:netty-handler:jar:4.1.60.Final:compile
[INFO]    |  |  +- io.netty:netty-common:jar:4.1.60.Final:compile
[INFO]    |  |  +- io.netty:netty-resolver:jar:4.1.60.Final:compile
[INFO]    |  |  +- io.netty:netty-buffer:jar:4.1.60.Final:compile
[INFO]    |  |  +- io.netty:netty-transport:jar:4.1.60.Final:compile
[INFO]    |  |  \- io.netty:netty-codec:jar:4.1.60.Final:compile
[INFO]    |  +- com.datastax.oss:java-driver-shaded-guava:jar:25.1-jre-graal-sub-1:compile
[INFO]    |  +- com.typesafe:config:jar:1.4.1:compile
[INFO]    |  +- com.github.jnr:jnr-posix:jar:3.1.5:compile
[INFO]    |  |  +- com.github.jnr:jnr-ffi:jar:2.2.2:compile
[INFO]    |  |  |  +- com.github.jnr:jffi:jar:1.3.1:compile
[INFO]    |  |  |  +- com.github.jnr:jffi:jar:native:1.3.1:runtime
[INFO]    |  |  |  +- org.ow2.asm:asm:jar:9.1:compile
[INFO]    |  |  |  +- org.ow2.asm:asm-commons:jar:9.1:compile
[INFO]    |  |  |  +- org.ow2.asm:asm-analysis:jar:9.1:compile
[INFO]    |  |  |  +- org.ow2.asm:asm-tree:jar:9.1:compile
[INFO]    |  |  |  +- org.ow2.asm:asm-util:jar:9.1:compile
[INFO]    |  |  |  +- com.github.jnr:jnr-a64asm:jar:1.0.0:compile
[INFO]    |  |  |  \- com.github.jnr:jnr-x86asm:jar:1.0.2:compile
[INFO]    |  |  \- com.github.jnr:jnr-constants:jar:0.10.1:compile
[INFO]    |  +- io.dropwizard.metrics:metrics-core:jar:4.1.18:compile
[INFO]    |  +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO]    |  +- com.esri.geometry:esri-geometry-api:jar:1.2.1:compile
[INFO]    |  |  +- org.json:json:jar:20090211:compile
[INFO]    |  |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.12:compile
[INFO]    |  +- com.fasterxml.jackson.core:jackson-core:jar:2.12.2:compile
[INFO]    |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.12.2:compile
[INFO]    |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.2:compile
[INFO]    |  +- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO]    |  +- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO]    |  \- com.github.spotbugs:spotbugs-annotations:jar:3.1.12:compile
[INFO]    |     \- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO]    +- com.datastax.oss:java-driver-query-builder:jar:4.13.0:compile
[INFO]    \- org.slf4j:slf4j-api:jar:1.7.32:compile
	<dependencies>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-cassandra</artifactId>
			<version>3.3.0</version>
		</dependency>
	</dependencies>

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Nov 15, 2021
@wilkinsona
Copy link
Member Author

wilkinsona commented Nov 15, 2021

Sorry for the lack of details. I noticed the problem when working on Spring Boot 2.4.x and it would appear that it is specific to Spring Data Cassandra 3.1.x:

plugins {
	id 'java'
}

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.data:spring-data-cassandra:3.1.15'
}
$ gradle dependencyInsight --dependency jcl-over-slf4j

> Task :dependencyInsight
org.slf4j:jcl-over-slf4j:1.7.25
   variant "compile" [
      org.gradle.status              = release (not requested)
      org.gradle.usage               = java-api
      org.gradle.libraryelements     = jar (compatible with: classes)
      org.gradle.category            = library

      Requested attributes not found in the selected variant:
         org.gradle.dependency.bundling = external
         org.gradle.jvm.environment     = standard-jvm
         org.gradle.jvm.version         = 8
   ]

org.slf4j:jcl-over-slf4j:1.7.25
\--- org.apache.tinkerpop:gremlin-core:3.4.8
     +--- com.datastax.oss:java-driver-core:4.9.0
     |    +--- org.springframework.data:spring-data-cassandra:3.1.15
     |    |    \--- compileClasspath
     |    \--- com.datastax.oss:java-driver-query-builder:4.9.0
     |         \--- org.springframework.data:spring-data-cassandra:3.1.15 (*)
     \--- org.apache.tinkerpop:tinkergraph-gremlin:3.4.8
          \--- com.datastax.oss:java-driver-core:4.9.0 (*)

(*) - dependencies omitted (listed previously)

A web-based, searchable dependency report is available by adding the --scan option.

BUILD SUCCESSFUL in 517ms
1 actionable task: 1 executed

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Nov 15, 2021
@mp911de
Copy link
Member

mp911de commented Nov 15, 2021

Thanks a lot. gremlin-core was made optional in java-driver-core:4.10.0 and that is why newer Cassandra drivers do not pull in jcl-over-slf4j. The 3.1.x development line has now reached OSS EOL. Unless there's a strong indication for another 3.1.x release, I'd keep things as-is for now.

@mp911de mp911de added this to the 3.1.16 (2020.0.16) milestone Nov 15, 2021
@wilkinsona
Copy link
Member Author

I'm surprised that 3.1.x has reached OSS EOL already. It's part of Spring Boot 2.4.x which is supported until August 2022.

@wilkinsona
Copy link
Member Author

@snicoll's just pointed out that I've mixed up my OSS support and full EOL dates. Boot 2.4.x will reach the end of its OSS support period when we release 2.6.0 later this week. We're all good here.

@mp911de mp911de added status: declined A suggestion or change that we don't feel we should currently apply and removed type: task A general task status: feedback-provided Feedback has been provided labels Feb 7, 2024
@mp911de
Copy link
Member

mp911de commented Feb 7, 2024

This is out of support so closing the ticket.

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

3 participants