Skip to content

Fix SLF4J dependency in tests: Failed to load class "org.slf4j.impl.StaticMDCBinder"#24

Merged
oleg-nenashev merged 1 commit into
wiremock:mainfrom
bitxon:bugfix/slf4j-logging
Apr 29, 2023
Merged

Fix SLF4J dependency in tests: Failed to load class "org.slf4j.impl.StaticMDCBinder"#24
oleg-nenashev merged 1 commit into
wiremock:mainfrom
bitxon:bugfix/slf4j-logging

Conversation

@bitxon
Copy link
Copy Markdown
Contributor

@bitxon bitxon commented Apr 25, 2023

Fixing logging error

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.

Dependencies Before fix

[INFO] +- org.testcontainers:testcontainers:jar:1.18.0:compile
[INFO] |  +- junit:junit:jar:4.13.2:compile (scope not updated to compile)
[INFO] |  |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.36:compile (scope not updated to compile)

[INFO] \- ch.qos.logback:logback-classic:jar:1.4.7:provided
[INFO]    +- ch.qos.logback:logback-core:jar:1.4.7:provided
[INFO]    \- (org.slf4j:slf4j-api:jar:2.0.4:provided - omitted for conflict with 1.7.36)

Dependencies After fix

[INFO] +- org.testcontainers:testcontainers:jar:1.18.0:compile
[INFO] |  +- junit:junit:jar:4.13.2:compile (scope not updated to compile)
[INFO] |  |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:2.0.4:compile (version managed from 1.7.36; scope not updated to compile)

[INFO] \- ch.qos.logback:logback-classic:jar:1.4.7:provided
[INFO]    +- ch.qos.logback:logback-core:jar:1.4.7:provided
[INFO]    \- (org.slf4j:slf4j-api:jar:2.0.4:provided - version managed from 2.0.4; omitted for duplicate)

@bitxon bitxon requested a review from oleg-nenashev as a code owner April 25, 2023 19:27
@oleg-nenashev
Copy link
Copy Markdown
Member

oleg-nenashev commented Apr 27, 2023

Will need to check whether the scope is correct in this case. Also, Maven Dependency Check plugin is a must (but a subject for a separate PR)

@oleg-nenashev oleg-nenashev added the bug Something isn't working label Apr 29, 2023
@oleg-nenashev oleg-nenashev merged commit ac2bef4 into wiremock:main Apr 29, 2023
@oleg-nenashev oleg-nenashev changed the title Fix SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder" Fix SLF4J dependency in tests: Failed to load class "org.slf4j.impl.StaticMDCBinder" Apr 29, 2023
@oleg-nenashev oleg-nenashev added chore Maintenance and removed bug Something isn't working labels Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants