AnthonyMastrean / chocolateypackages

Application packages for Windows
https://chocolatey.org/profiles/AnthonyMastrean
18 stars 63 forks source link

Liquibase > Latest zip leads to SLF4J missing classes #320

Closed adriens closed 5 years ago

adriens commented 5 years ago

The latest zip leads to this kind of exception :

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at liquibase.logging.core.Slf4JLoggerFactory.getLog(Slf4JLoggerFactory.java:9)
        at liquibase.logging.LogService.getLog(LogService.java:39)
        at liquibase.integration.commandline.Main.<clinit>(Main.java:67)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 3 more

C:\Users\salad74>liquibase -version
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at liquibase.logging.core.Slf4JLoggerFactory.getLog(Slf4JLoggerFactory.java:9)
        at liquibase.logging.LogService.getLog(LogService.java:39)
        at liquibase.integration.commandline.Main.<clinit>(Main.java:67)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
adriens commented 5 years ago

https://liquibase.jira.com/browse/CORE-3363

adriens commented 5 years ago

https://liquibase.jira.com/browse/CORE-3322

adriens commented 5 years ago

https://liquibase.jira.com/browse/CORE-3301

adriens commented 5 years ago

https://liquibase.jira.com/browse/CORE-3281

adriens commented 5 years ago

https://liquibase.jira.com/browse/CORE-3249

adriens commented 5 years ago

https://liquibase.jira.com/browse/CORE-3222

adriens commented 5 years ago

It is due to the fact the SLF4J jar is not delivered anymore in the official distribution (zip and tar.gz). It occures since 3.6.0 ...

adriens commented 5 years ago

The workaround consists in dropping the missing jar https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.25

in the lib directory of liquibase ... then it works.

In fact, the actually released choco package is not working ❗️

adriens commented 5 years ago

Preparing the patch...

adriens commented 5 years ago

As I cannot change the original zip, I should add it afterwards. @AnthonyMastrean : could you provide me some PS sample that adds a local file to the final distribution ? For example : copy work/slf4j-api-1.7.25.jar to lib ?..so I can put it into the PS1 install script.

Thank you in advance for your help. 👍

adriens commented 5 years ago

Fixed 👍

adriens commented 5 years ago

The SLF4j missing classes iw now fixed in the native release in 3.6.3 :

[CORE-3222] - Bin zip doesn't work due to missing slf4j-api JAR

adriens commented 5 years ago

Will be fixed thanks to https://github.com/adriens/chocolatey-liquibase/issues/1

adriens commented 5 years ago

Fixed in 3.6.3.

Just :

choco upgrade liquibase
liquibase --version

and it will be ok 👍