quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.54k stars 2.61k forks source link

quarkus-test-oidc-server is pulling in a wiremock-standalone that causes problems with SLF4J #38261

Closed gkfirst8 closed 7 months ago

gkfirst8 commented 7 months ago

Describe the bug

When adding quarkus-test-oidc-server to a Quarkus project and annotating a test with @QuarkusTestResource(OidcWiremockTestResource.class) as described in OpenID Connect (OIDC) Bearer token authentication we get this is the console/log while running the test:

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:///home/user/.m2/repository/org/wiremock/wiremock-standalone/3.2.0/wiremock-standalone-3.2.0.jar!/wiremock/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.

Expected behavior

We expect the systems to figure it out and make sure all logging still works.

Actual behavior

The log as show in the description.

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:///home/user/.m2/repository/org/wiremock/wiremock-standalone/3.2.0/wiremock-standalone-3.2.0.jar!/wiremock/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.

How to Reproduce?

See https://github.com/gkfirst8/quarkus-logging-test-reproducer for a proof:

Output of uname -a or ver

5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.9" 2023-10-17 LTS OpenJDK Runtime Environment Corretto-17.0.9.8.1 (build 17.0.9+8-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.9.8.1 (build 17.0.9+8-LTS, mixed mode, sharing)

Quarkus version or git rev

3.6.4

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Additional information

Notice that the release notes of wiremock do contain information about SLF4J with respect to this problem.

quarkus-bot[bot] commented 7 months ago

/cc @pedroigor (oidc), @sberyozkin (oidc)

gkfirst8 commented 7 months ago

Looks like it will be fixed in 3.7.0 as I can see that already has wiremock locked at 3.3.1. Thanks!