1 year ago
#266592
Peter McKinney
Liquibase & pf4j - Cannot find default log service
I'm writing a pf4j plugin that uses liquibase. The plugin host has dependencies on slf4j
implementation "org.slf4j:slf4j-log4j12:$slf4jVersion"
implementation "org.slf4j:slf4j-api:$slf4jVersion"
And the plugin has these dependencies as compile only, as well liquibase core
compileOnly "org.slf4j:slf4j-log4j12:$slf4jVersion"
compileOnly "org.slf4j:slf4j-api:$slf4jVersion"
implementation "org.liquibase:liquibase-core:$liquibaseVersion"
However, when the plugin is run, liquibase cannot find its default logger. and throws the following exception.
Caused by: liquibase.exception.UnexpectedLiquibaseException: Cannot find default log service
at liquibase.Scope.getCurrentScope(Scope.java:71)
at liquibase.database.core.PostgresDatabase.<clinit>(PostgresDatabase.java:36)
I have a feeling that this is because both pf4j and liquibase use their own service loaders, and I have a feeling they may be clashing. Does anyone have any suggestions? I'm really well and truly stuck.
Thanks, Peter
java
kotlin
jvm
liquibase
pf4j
0 Answers
Your Answer