You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying out Spring Boot for the first time and looking to create a minimal project which achieves the following:
uses Gradle+Kotlin as the build tool
allows liquibase to generate database changes using the JPA/Hibernate model entities I define within Spring Boot.
I appreciate this question cuts across Spring, liquibase, gradle and this plugin, but it wasn't obvious where else to ask for help with this and I think it is probably the liquibase-hibernate configuration that I ultimately need help with. And it would be a great service to newbies like myself if someone could provide a minimal working example. I've spent several days trying to achieve this with no success so far.
Thanks in advance if anyone can offer any advice.
At the moment, I get the following error when running the liquibase generateChangelog command from within Gradle:
Task :generateChangelog FAILED
liquibase-plugin: Running the 'main' activity...
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.configuration.AutoloadedConfigurations: Provider com.datical.liquibase.ext.config.LiquibaseProConfiguration could not be instantiated
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.configuration.AutoloadedConfigurations: Provider com.datical.liquibase.ext.config.NativeExecutorConfiguration could not be instantiated
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.configuration.AutoloadedConfigurations: Provider com.datical.liquibase.ext.config.LiquibaseFlowConfiguration could not be instantiated
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.configuration.AutoloadedConfigurations: Provider com.datical.liquibase.ext.config.ReportConfiguration could not be instantiated
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.configuration.AutoloadedConfigurations: Provider com.datical.liquibase.ext.config.ExtendedLiquibaseCommandLineConfiguration could not be instantiated
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.configuration.AutoloadedConfigurations: Provider com.datical.liquibase.ext.config.SqlplusConfiguration could not be instantiated
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.logging.LogService: Provider com.datical.liquibase.ext.logging.structured.StructuredLogService could not be instantiated
May 21, 2024 12:06:53 PM liquibase.servicelocator
INFO: Cannot load service: liquibase.command.CommandStep: com.datical.liquibase.ext.command.RollbackOneChangesetSqlCommandStep Unable to get public no-arg constructor
Exception in thread "main" java.lang.NoClassDefFoundError: liquibase/command/CleanUpCommandStep
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1217)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1228)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
at liquibase.servicelocator.StandardServiceLocator.findInstances(StandardServiceLocator.java:22)
at liquibase.command.CommandFactory.findAllInstances(CommandFactory.java:147)
at liquibase.command.CommandFactory.getCommands(CommandFactory.java:69)
at liquibase.integration.commandline.LiquibaseCommandLine.getCommands(LiquibaseCommandLine.java:978)
at liquibase.integration.commandline.LiquibaseCommandLine.buildPicoCommandLine(LiquibaseCommandLine.java:202)
at liquibase.integration.commandline.LiquibaseCommandLine.<init>(LiquibaseCommandLine.java:178)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:82)
Caused by: java.lang.ClassNotFoundException: liquibase.command.CleanUpCommandStep
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
Caused by: java.lang.ClassNotFoundException: liquibase.command.CleanUpCommandStep
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 33 more
The text was updated successfully, but these errors were encountered:
Hi, yes I struggled with this too at the beginning. There is a subtle information that is missing in the Documentation:
You have to compile your project before executing any Liquibase operation.
Liquibase is NOT looking at your source code, instead it is looking at your byte code. Which makes sense, because with Spring/Hibernate you heavily rely on code injection that you do not see at your source code, but is generated automatically for you.
You have mentioned that you're using Gradle. I do too. Therefore to make sure the project is alway "fresh", I added following line into my build.gradle:
I'm trying out Spring Boot for the first time and looking to create a minimal project which achieves the following:
I appreciate this question cuts across Spring, liquibase, gradle and this plugin, but it wasn't obvious where else to ask for help with this and I think it is probably the
liquibase-hibernate
configuration that I ultimately need help with. And it would be a great service to newbies like myself if someone could provide a minimal working example. I've spent several days trying to achieve this with no success so far.Thanks in advance if anyone can offer any advice.
At the moment, I get the following error when running the liquibase
generateChangelog
command from within Gradle:The text was updated successfully, but these errors were encountered: