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

Shaded slf4j-jdk14 to work with simba driver's shaded slf4j-api #146

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

nvoxland
Copy link
Contributor

@nvoxland nvoxland commented Jul 2, 2022

Description

When running Liquibase with the simba driver, we get a:

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.

warning.

The way it is supposed to work is that you just have to add the slf4j binding jar you want. In our case, add the jar from https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14/ to your liquibase lib directory.

BUT: the datastax simba driver has shaded the slf4j dependency into a com.simba.cassandra.shaded.slf4j package and so the normal slf4j logic has been updated to look for a com/simba/cassandra/shaded/slf4j/impl/StaticLoggerBinder.class which is not valid in slf4j-jdk14 and so even with that jar file you get the binding error.

This PR shades the slf4j-jdk14 dependency into the liquibase-cassandra extension using the com.simba.cassandra.shaded.slf4j package so it gets found and the message goes away.

@nvoxland nvoxland requested a review from kevin-atx July 6, 2022 13:57
@nvoxland nvoxland removed their assignment Jul 6, 2022
Copy link
Contributor

@kevin-atx kevin-atx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discussed this with Nathan and agree with the code changes. They fix an inherent problem in the Simba driver that broke support for login. This change fixes the problem in the Simba drive and it enables logging to work for Liquibase users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants