Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snakeyaml error when running diffChangelog #146

Open
jasperjanuar opened this issue May 3, 2024 · 1 comment
Open

Snakeyaml error when running diffChangelog #146

jasperjanuar opened this issue May 3, 2024 · 1 comment

Comments

@jasperjanuar
Copy link

jasperjanuar commented May 3, 2024

Version:

  • Liquibase 4.27.0
  • Snakeyaml 2.2.0

liquibase.properties

liquibase.searchPath=src/main/resources/db
url=jdbc:postgresql://localhost:5432/foo
username=foo
password=foo
changelogFile=src/main/resources/db/db.changelog-master.yml
referenceDriver=liquibase.ext.hibernate.database.connection.HibernateDriver
referenceUrl=hibernate:spring:com.januar\
  ?dialect=org.hibernate.dialect.PostgreSQLDialect\
  &hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy\
  &hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy

Issue
When running diffChangelog I get the following error

liquibase-plugin: Running the 'main' activity...
May 03, 2024 9:35:02 AM liquibase.servicelocator
INFO: Cannot load service
java.util.ServiceConfigurationError: liquibase.command.CommandStep: Provider com.datical.liquibase.ext.command.checks.ChecksCreateCommandStep could not be instantiated
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586)
	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:813)
	at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:729)
	at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1403)
	at liquibase.servicelocator.StandardServiceLocator.findInstances(StandardServiceLocator.java:24)
	at liquibase.command.CommandFactory.findAllInstances(CommandFactory.java:244)
	at liquibase.command.CommandFactory.getCommands(CommandFactory.java:163)
	at liquibase.integration.commandline.LiquibaseCommandLine.getCommands(LiquibaseCommandLine.java:1115)
	at liquibase.integration.commandline.LiquibaseCommandLine.buildPicoCommandLine(LiquibaseCommandLine.java:218)
	at liquibase.integration.commandline.LiquibaseCommandLine.<init>(LiquibaseCommandLine.java:194)
	at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:102)
Caused by: java.lang.NoClassDefFoundError: org/yaml/snakeyaml/inspector/TagInspector
	at liquibase.util.SnakeYamlUtil.lambda$setDefaultTagInspector$3(SnakeYamlUtil.java:38)
	at liquibase.util.SnakeYamlUtil.safelyCallNewSnakeYamlMethod(SnakeYamlUtil.java:46)
	at liquibase.util.SnakeYamlUtil.setDefaultTagInspector(SnakeYamlUtil.java:38)
	at com.datical.liquibase.ext.checks.config.CheckSettingsConfigYaml.<init>(CheckSettingsConfigYaml.java:29)
	at com.datical.liquibase.ext.command.checks.ChecksCreateCommandStep.<clinit>(ChecksCreateCommandStep.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.Constructor.newInstance(Constructor.java:480)
	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:789)
	... 9 more
Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.inspector.TagInspector
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 20 more

The changelog is created as expected, but errors are thrown.
The error is not thrown in version 4.26.0

@stevesaliman
Copy link
Collaborator

There were a lot of compatibility issues with the 2.x version of the plugin with Liquibase 4.17+. Version 3.0.0 was released this morning, is this still a problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants