Applies to:
- Liquibase Pro
- Liquibase Open Source (Community)
Conditions:
- None
Issue Summary:
Liquibase is outputting multiple SLF4J errors when running any Liquibase command.
Error Messages:
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.
Root Cause:
To proceed with the SLF4J process, you need an SLF4J-api and an SLF4J provider. In this example, slf4j-api-1.7.36 is the API, and slf4j-simple-2.0.7.jar is the provider.
An SLF4J error occurs because Cassandra and other databases, such as BigQuery, do not ship with an SLF4J logging implementation, even though it relies on the SLF4J API. This is because it can be used as an API or as an application. If an error like this appears, you can bring in any SLF4J logging implementation of your choosing to your classpath to solve the issue. Find two resolution options below.
Example: SLF4J simple or any of the implementations defined here.
Resolution Guide:
Option 1:
Keep slf4j-api-1.7.36 and then use the corresponding 1.7.36 version of the provider slf4j-simple, found here.
Option 2:
Remove slf4j-api-1.7.36 from the lib directory for the errors to disappear.
For BigQuery users:
It is important to note for BigQuery users that an API jar, slf4j-api-1.7.36.jar, is included with the BigQuery JDBC drivers. To avoid the SLF4J error, ensure you add an SFL4J provider jar that corresponds to the same version, such as slf4j-simple-1.7.36.jar.
Note: It is important to note that this can impact other functionality associated with the SLF4J file. Proceed with caution.
Comments
0 comments
Article is closed for comments.