Is the plugin still supported? There are a few issues posted but no update
opened 06:24AM - 12 May 22 UTC
Hi there,
I am unsing the liquibase gradle plugin in version 2.1.1 and gradle w… ith 7.4.2. together with Java 17. By starting for example a "snapshot" task I get the following call stack.
Before I was using Java 11 with gradle 6.9.1. and the same plugin version and it worked perfectly.
```
> Task :liquibase:snapshot
liquibase-plugin: Running the 'generate_local_hibernate' activity...
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:107)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
at groovy.lang.Closure.<init>(Closure.java:211)
at groovy.lang.Closure.<init>(Closure.java:228)
at groovy.lang.Closure$1.<init>(Closure.java:193)
at groovy.lang.Closure.<clinit>(Closure.java:193)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at picocli.CommandLine$DefaultFactory.loadClosureClass(CommandLine.java:5477)
at picocli.CommandLine$DefaultFactory.<clinit>(CommandLine.java:5475)
at picocli.CommandLine.<init>(CommandLine.java:196)
at picocli.CommandLine$Model$CommandSpec.addSubcommand(CommandLine.java:6405)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommandGroup(LiquibaseCommandLine.java:878)
at liquibase.integration.commandline.LiquibaseCommandLine.getParentCommandSpec(LiquibaseCommandLine.java:835)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommand(LiquibaseCommandLine.java:788)
at liquibase.integration.commandline.LiquibaseCommandLine.buildPicoCommandLine(LiquibaseCommandLine.java:199)
at liquibase.integration.commandline.LiquibaseCommandLine.<init>(LiquibaseCommandLine.java:174)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:78)
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
at org.codehaus.groovy.runtime.dgmimpl.NumberNumberMetaMethod.<clinit>(NumberNumberMetaMethod.java:33)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
at java.base/java.lang.Class.newInstance(Class.java:645)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.createMetaMethodFromClass(MetaClassRegistryImpl.java:257)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:110)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
at groovy.lang.Closure.<init>(Closure.java:211)
at groovy.lang.Closure.<init>(Closure.java:228)
at groovy.lang.Closure$1.<init>(Closure.java:193)
at groovy.lang.Closure.<clinit>(Closure.java:193)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at picocli.CommandLine$DefaultFactory.loadClosureClass(CommandLine.java:5477)
at picocli.CommandLine$DefaultFactory.<clinit>(CommandLine.java:5475)
at picocli.CommandLine.<init>(CommandLine.java:196)
at picocli.CommandLine$Model$CommandSpec.addSubcommand(CommandLine.java:6405)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommandGroup(LiquibaseCommandLine.java:878)
at liquibase.integration.commandline.LiquibaseCommandLine.getParentCommandSpec(LiquibaseCommandLine.java:835)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommand(LiquibaseCommandLine.java:788)
at liquibase.integration.commandline.LiquibaseCommandLine.buildPicoCommandLine(LiquibaseCommandLine.java:199)
at liquibase.integration.commandline.LiquibaseCommandLine.<init>(LiquibaseCommandLine.java:174)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:78)
> Task :liquibase:snapshot FAILED
Execution failed for task ':liquibase:snapshot'
```
opened 10:24AM - 10 Nov 21 UTC
Hi,
Recently I had to upgrade this plugin from 2.0.1 to 2.0.4 for upgrading Gra… dle 5 to 7.
Post which I started getting following error on running liquibase update:
Error: Could not find or load main class Files
Caused by: java.lang.ClassNotFoundException: Files
On investigating I found that it's due to -Djava.library.path having C:/Program Files directories in it.
The property seems to be automatically added by java or IDE.
Manually overriding the property to blank helped resolve the issue as a workaround.
But I was wondering if there's a code fix possible for the same in the plugin, as havne't faced this issue anywhere else?
I checked out source for your plugin and tried to do gradle build and it fails with gradle 7.4. Works fine with older gradle versions. It might be a relatively easy fix but there could be other issues. Here is the log. I am bringing this issue up so you guys can please revisit the compatibility in latest gradle versions.
> Task :processResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processResources'.
> Entry META-INF/gradle-plugins/org.liquibase.gradle.properties is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.4.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
Hi, another user posted issue
opened 06:24AM - 12 May 22 UTC
Hi there,
I am unsing the liquibase gradle plugin in version 2.1.1 and gradle w… ith 7.4.2. together with Java 17. By starting for example a "snapshot" task I get the following call stack.
Before I was using Java 11 with gradle 6.9.1. and the same plugin version and it worked perfectly.
```
> Task :liquibase:snapshot
liquibase-plugin: Running the 'generate_local_hibernate' activity...
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:107)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
at groovy.lang.Closure.<init>(Closure.java:211)
at groovy.lang.Closure.<init>(Closure.java:228)
at groovy.lang.Closure$1.<init>(Closure.java:193)
at groovy.lang.Closure.<clinit>(Closure.java:193)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at picocli.CommandLine$DefaultFactory.loadClosureClass(CommandLine.java:5477)
at picocli.CommandLine$DefaultFactory.<clinit>(CommandLine.java:5475)
at picocli.CommandLine.<init>(CommandLine.java:196)
at picocli.CommandLine$Model$CommandSpec.addSubcommand(CommandLine.java:6405)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommandGroup(LiquibaseCommandLine.java:878)
at liquibase.integration.commandline.LiquibaseCommandLine.getParentCommandSpec(LiquibaseCommandLine.java:835)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommand(LiquibaseCommandLine.java:788)
at liquibase.integration.commandline.LiquibaseCommandLine.buildPicoCommandLine(LiquibaseCommandLine.java:199)
at liquibase.integration.commandline.LiquibaseCommandLine.<init>(LiquibaseCommandLine.java:174)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:78)
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
at org.codehaus.groovy.runtime.dgmimpl.NumberNumberMetaMethod.<clinit>(NumberNumberMetaMethod.java:33)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
at java.base/java.lang.Class.newInstance(Class.java:645)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.createMetaMethodFromClass(MetaClassRegistryImpl.java:257)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:110)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
at groovy.lang.Closure.<init>(Closure.java:211)
at groovy.lang.Closure.<init>(Closure.java:228)
at groovy.lang.Closure$1.<init>(Closure.java:193)
at groovy.lang.Closure.<clinit>(Closure.java:193)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at picocli.CommandLine$DefaultFactory.loadClosureClass(CommandLine.java:5477)
at picocli.CommandLine$DefaultFactory.<clinit>(CommandLine.java:5475)
at picocli.CommandLine.<init>(CommandLine.java:196)
at picocli.CommandLine$Model$CommandSpec.addSubcommand(CommandLine.java:6405)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommandGroup(LiquibaseCommandLine.java:878)
at liquibase.integration.commandline.LiquibaseCommandLine.getParentCommandSpec(LiquibaseCommandLine.java:835)
at liquibase.integration.commandline.LiquibaseCommandLine.addSubcommand(LiquibaseCommandLine.java:788)
at liquibase.integration.commandline.LiquibaseCommandLine.buildPicoCommandLine(LiquibaseCommandLine.java:199)
at liquibase.integration.commandline.LiquibaseCommandLine.<init>(LiquibaseCommandLine.java:174)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:78)
> Task :liquibase:snapshot FAILED
Execution failed for task ':liquibase:snapshot'
```
Do you have any ETA for fix?