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

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" when running an integration #4882

Closed
claudio4j opened this issue Oct 30, 2023 · 1 comment · Fixed by apache/camel-k-runtime#1100 or #4883
Assignees
Labels
kind/bug Something isn't working

Comments

@claudio4j
Copy link
Contributor

claudio4j commented Oct 30, 2023

What happened?

When run any integration in Camel K 2.1.0 or 2.2.0-SNAPSHOT there is a warning in camel-k-operator log

"camel-k.maven.build","msg":"SLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\"."}
"camel-k.maven.build","msg":"SLF4J: Defaulting to no-operation (NOP) logger implementation"}
"camel-k.maven.build","msg":"SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details."}
"camel-k.maven.build","msg":"Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)"}

This message doesn't happen in camel-k-operator 2.0.1.

You can

Steps to reproduce

You can run just the mvn command in the camel-k-operator pod

kubectl exec -i -t `kubectl get pod -l app=camel-k -oname` -- /usr/share/maven/mvnw/mvnw --version

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /usr/share/maven/wrapper/dists/apache-maven-3.8.6-bin/5f1464e3/apache-maven-3.8.6
Java version: 17.0.8.1, vendor: Eclipse Adoptium, runtime: /opt/java/openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.57", arch: "amd64", family: "unix"

The notable logback and slf4j libraries in maven are

/usr/share/maven/wrapper/dists/apache-maven-3.8.6-bin/5f1464e3/apache-maven-3.8.6/lib/jcl-over-slf4j-1.7.36.jar
/usr/share/maven/wrapper/dists/apache-maven-3.8.6-bin/5f1464e3/apache-maven-3.8.6/lib/logback-classic-1.4.8.jar
/usr/share/maven/wrapper/dists/apache-maven-3.8.6-bin/5f1464e3/apache-maven-3.8.6/lib/logback-core-1.4.8.jar
/usr/share/maven/wrapper/dists/apache-maven-3.8.6-bin/5f1464e3/apache-maven-3.8.6/lib/logstash-logback-encoder-7.3.jar
/usr/share/maven/wrapper/dists/apache-maven-3.8.6-bin/5f1464e3/apache-maven-3.8.6/lib/slf4j-api-1.7.36.jar

logback 1.4.x is incompatible to slf4j 1.7, it should use slf4j 2.0 instead.

Also, logstash-logback-encoder depends on logback 1.3.7, and maven overlays logback 1.4.8, but it seems to not be a problem.

Camel K version

2.2.0-SNAPSHOT

@claudio4j claudio4j added the kind/bug Something isn't working label Oct 30, 2023
@claudio4j claudio4j self-assigned this Oct 30, 2023
claudio4j added a commit to claudio4j/camel-k that referenced this issue Oct 30, 2023
camel-k-maven-logging from camel-k-runtime will bring slf4j-api 2.0
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
@claudio4j
Copy link
Contributor Author

I think this issue should not be closed as it was not fixed on camel-k.

@claudio4j claudio4j reopened this Oct 31, 2023
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 2, 2023
moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 3, 2023
moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 3, 2023
moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 3, 2023
moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 3, 2023
moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 3, 2023
moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 3, 2023
moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882
claudio4j added a commit that referenced this issue Nov 6, 2023
…4883)

moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix #4882
claudio4j added a commit to claudio4j/camel-k that referenced this issue Nov 6, 2023
…pache#4883)

moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix apache#4882

(cherry picked from commit 0c1c01d)
claudio4j added a commit that referenced this issue Nov 6, 2023
…4883) (#4900)

moved camel-k-maven-logging from camel-k-runtime to camel-k project
to make the maven logging independent of the camel-k-runtime
slf4j-api 1.7 originally from maven zip should be removed

Fix #4882

(cherry picked from commit 0c1c01d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
1 participant