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

liquibase command failure #274

Open
anikdas opened this issue Jul 6, 2022 · 1 comment
Open

liquibase command failure #274

anikdas opened this issue Jul 6, 2022 · 1 comment

Comments

@anikdas
Copy link

anikdas commented Jul 6, 2022

We are trying to set up liquibase for our MongoDB schema migration management. We are facing the following issue when we run liquibase update

Log output for liquibase updateSQL --log-level debug

[2022-07-06 15:37:20] FINE [liquibase.resource] Adding path /Users/anikdas/Documents/work/repos/db-migrations/mongodb/agent/. to resourceAccessor liquibase.resource.FileSystemResourceAccessor
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.shouldRun aka should.run found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.shouldRun is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.showBanner found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.showBanner is using the default value of true
####################################################
##   _     _             _ _                      ##
##  | |   (_)           (_) |                     ##
##  | |    _  __ _ _   _ _| |__   __ _ ___  ___   ##
##  | |   | |/ _` | | | | | '_ \ / _` / __|/ _ \  ##
##  | |___| | (_| | |_| | | |_) | (_| \__ \  __/  ##
##  \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___|  ##
##              | |                               ##
##              |_|                               ##
##                                                ## 
##  Get documentation at docs.liquibase.com       ##
##  Get certified courses at learn.liquibase.com  ## 
##  Free schema change activity reports at        ##
##      https://hub.liquibase.com                 ##
##                                                ##
####################################################
Starting Liquibase at 15:37:20 (version 4.12.0 #3073 built at 2022-06-17 05:59+0000)
Liquibase Version: 4.12.0
Liquibase Community 4.12.0 by Liquibase
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.monitorPerformance found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.monitorPerformance is using the default value of false
[2022-07-06 15:37:20] FINE [liquibase.integration] Performance monitoring disabled
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.outputFile found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.strict found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.strict is using the default value of false
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.changeExecListenerClass found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.changeExecListenerClass found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.changeExecListenerPropertiesFile found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.changeExecListenerPropertiesFile found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.changelogFile found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Found 'liquibase.command.changelogFile' configuration of 'changelog-root.xml'
    file /Users/anikdas/Documents/work/repos/db-migrations/mongodb/agent/liquibase.properties 'changeLogFile' of 'changelog-root.xml'
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.contexts found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.contexts found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.defaultCatalogName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.defaultCatalogName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.defaultSchemaName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.defaultSchemaName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.driver found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.driver found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.driverPropertiesFile found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.driverPropertiesFile found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.labels found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.labels found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.outputDefaultCatalog found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.outputDefaultCatalog found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.outputDefaultSchema found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.outputDefaultSchema found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.password found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.password found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.url found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Found 'liquibase.command.url' configuration of 'mongodb://localhost:27017/test_anik'
    file /Users/anikdas/Documents/work/repos/db-migrations/mongodb/agent/liquibase.properties 'liquibase.command.url' of 'mongodb://localhost:27017/test_anik'
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.updateSql.username found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.command.username found
[2022-07-06 15:37:20] FINE [liquibase.command] Pipeline for command 'updateSql: liquibase.command.core.UpdateSqlCommandStep
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultCatalog is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.updateSql.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.command.outputDefaultSchema is using the default value of true
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.hub.apiKey found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.propertyProviderClass found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.databaseClass found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.hub.url found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.hub.url is using the default value of https://hub.liquibase.com
[2022-07-06 15:37:20] FINE [liquibase.integration] Liquibase Hub URL:      https://hub.liquibase.com
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.hub.mode found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.hub.mode is using the default value of ALL
[2022-07-06 15:37:20] FINE [liquibase.integration] Liquibase Hub Mode:     ALL
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.CockroachDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.DB2Database
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.Db2zDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.DerbyDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.EnterpriseDBDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.FirebirdDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.H2Database
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.HsqlDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.InformixDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.Ingres9Database
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.MSSQLDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.MariaDBDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.MockDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.MySQLDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.OracleDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.PostgresDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.SQLiteDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.SybaseASADatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.SybaseDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.UnsupportedDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.database.core.SnowflakeDatabase
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.Database instance liquibase.ext.mongodb.database.MongoLiquibaseDatabase
[2022-07-06 15:37:20] FINE [liquibase.database] Properties:
[2022-07-06 15:37:20] FINE [liquibase.database] Connecting to the URL:'mongodb://localhost:27017/test_anik' using driver:'liquibase.ext.mongodb.database.MongoClientDriver'
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.DatabaseConnection instance liquibase.database.jvm.JdbcConnection
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.DatabaseConnection instance com.datical.liquibase.ext.database.jvm.ProJdbcConnection
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.database.DatabaseConnection instance liquibase.ext.mongodb.database.MongoConnection
[2022-07-06 15:37:20] FINE [liquibase.database] Connection has been created
[2022-07-06 15:37:20] FINE [liquibase.ext] Connected to @localhost:27017
[2022-07-06 15:37:20] FINE [liquibase.ext] Not adjusting the auto commit mode; it is already false
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.liquibaseCatalogName aka liquibase.catalogName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.liquibaseSchemaName aka liquibase.schemaName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.preserveSchemaCase found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.preserveSchemaCase is using the default value of false
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.liquibaseTablespaceName aka liquibase.databaseChangeLogTablespaceName aka liquibase.liquibaseTableSpaceName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.shouldSnapshotData found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.shouldSnapshotData is using the default value of false
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.Catalog
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.Column
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.Data
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.ForeignKey
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.Index
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.PrimaryKey
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.Schema
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.Sequence
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.StoredProcedure
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.Table
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.UniqueConstraint
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance liquibase.structure.core.View
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance com.datical.liquibase.ext.appdba.synonym.Synonym
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance com.datical.liquibase.ext.storedlogic.checkconstraint.CheckConstraint
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance com.datical.liquibase.ext.storedlogic.databasepackage.DatabasePackage
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance com.datical.liquibase.ext.storedlogic.databasepackage.DatabasePackageBody
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance com.datical.liquibase.ext.storedlogic.function.Function
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.structure.DatabaseObject instance com.datical.liquibase.ext.storedlogic.trigger.Trigger
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.databaseChangelogLockTableName aka liquibase.databaseChangeLogLockTableName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.databaseChangelogLockTableName is using the default value of DATABASECHANGELOGLOCK
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.databaseChangelogTableName aka liquibase.databaseChangeLogTableName found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.databaseChangelogTableName is using the default value of DATABASECHANGELOG
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.supportPropertyEscaping aka enableEscaping found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.supportPropertyEscaping is using the default value of false
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.outputFileEncoding found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.outputFileEncoding is using the default value of UTF-8
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.executor.Executor instance liquibase.executor.jvm.JdbcExecutor
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.executor.Executor instance com.datical.liquibase.ext.tools.OracleSqlPlusExecutor
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.executor.Executor instance com.datical.liquibase.ext.tools.MssqlSqlcmdExecutor
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.executor.Executor instance liquibase.nosql.executor.NoSqlExecutor
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.outputLineSeparator found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.outputLineSeparator is using the default value of 

[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.lockservice.LockService instance liquibase.lockservice.LockServiceImpl
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.lockservice.LockService instance liquibase.lockservice.MockLockService
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.lockservice.LockService instance liquibase.lockservice.OfflineLockService
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.lockservice.LockService instance liquibase.lockservice.StandardLockService
[2022-07-06 15:37:20] FINE [liquibase.servicelocator] Loaded liquibase.lockservice.LockService instance liquibase.ext.mongodb.lockservice.MongoLockService
[2022-07-06 15:37:20] FINE [liquibase.configuration] No configuration value for liquibase.changelogLockWaitTimeInMinutes aka liquibase.changeLogLockWaitTimeInMinutes found
[2022-07-06 15:37:20] FINE [liquibase.configuration] Configuration liquibase.changelogLockWaitTimeInMinutes is using the default value of 5
[2022-07-06 15:37:20] SEVERE [liquibase.integration] java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.command.CommandScope.execute(CommandScope.java:162)
        at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
        at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$1(LiquibaseCommandLine.java:336)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:165)
        at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:301)
        at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:90)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:577)
        at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:91)
Caused by: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.integration.commandline.Main$1.run(Main.java:443)
        at liquibase.integration.commandline.Main$1.run(Main.java:221)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:165)
        at liquibase.integration.commandline.Main.run(Main.java:221)
        at liquibase.command.AbstractCliWrapperCommandStep.run(AbstractCliWrapperCommandStep.java:33)
        at liquibase.command.CommandScope.execute(CommandScope.java:156)
        ... 18 more
Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.acquireLock(AbstractNoSqlLockService.java:183)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.waitForLock(AbstractNoSqlLockService.java:119)
        at liquibase.Liquibase$1.run(Liquibase.java:444)
        at liquibase.Scope.lambda$child$0(Scope.java:180)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:179)
        at liquibase.Scope.child(Scope.java:158)
        at liquibase.Liquibase.runInScope(Liquibase.java:2405)
        at liquibase.Liquibase.update(Liquibase.java:433)
        at liquibase.Liquibase.update(Liquibase.java:425)
        at liquibase.integration.commandline.Main.doMigration(Main.java:1893)
        at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:398)
        at liquibase.Scope.lambda$child$0(Scope.java:180)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:179)
        at liquibase.Scope.child(Scope.java:158)
        at liquibase.integration.commandline.Main$1.run(Main.java:397)
        ... 24 more
Caused by: liquibase.exception.DatabaseException: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.hasDatabaseChangeLogLockTable(AbstractNoSqlLockService.java:307)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.init(AbstractNoSqlLockService.java:93)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.acquireLock(AbstractNoSqlLockService.java:155)
        ... 40 more
Caused by: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.getExecutor(AbstractNoSqlLockService.java:87)
        at liquibase.ext.mongodb.lockservice.MongoLockService.existsRepository(MongoLockService.java:85)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.hasDatabaseChangeLogLockTable(AbstractNoSqlLockService.java:305)
        ... 42 more


Unexpected error running Liquibase: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)

liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.command.CommandScope.execute(CommandScope.java:162)
        at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
        at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$1(LiquibaseCommandLine.java:336)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:165)
        at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:301)
        at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:90)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:577)
        at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:91)
Caused by: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.integration.commandline.Main$1.run(Main.java:443)
        at liquibase.integration.commandline.Main$1.run(Main.java:221)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:165)
        at liquibase.integration.commandline.Main.run(Main.java:221)
        at liquibase.command.AbstractCliWrapperCommandStep.run(AbstractCliWrapperCommandStep.java:33)
        at liquibase.command.CommandScope.execute(CommandScope.java:156)
        ... 18 more
Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.acquireLock(AbstractNoSqlLockService.java:183)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.waitForLock(AbstractNoSqlLockService.java:119)
        at liquibase.Liquibase$1.run(Liquibase.java:444)
        at liquibase.Scope.lambda$child$0(Scope.java:180)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:179)
        at liquibase.Scope.child(Scope.java:158)
        at liquibase.Liquibase.runInScope(Liquibase.java:2405)
        at liquibase.Liquibase.update(Liquibase.java:433)
        at liquibase.Liquibase.update(Liquibase.java:425)
        at liquibase.integration.commandline.Main.doMigration(Main.java:1893)
        at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:398)
        at liquibase.Scope.lambda$child$0(Scope.java:180)
        at liquibase.Scope.child(Scope.java:189)
        at liquibase.Scope.child(Scope.java:179)
        at liquibase.Scope.child(Scope.java:158)
        at liquibase.integration.commandline.Main$1.run(Main.java:397)
        ... 24 more
Caused by: liquibase.exception.DatabaseException: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.hasDatabaseChangeLogLockTable(AbstractNoSqlLockService.java:307)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.init(AbstractNoSqlLockService.java:93)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.acquireLock(AbstractNoSqlLockService.java:155)
        ... 40 more
Caused by: java.lang.ClassCastException: class liquibase.executor.LoggingExecutor cannot be cast to class liquibase.nosql.executor.NoSqlExecutor (liquibase.executor.LoggingExecutor and liquibase.nosql.executor.NoSqlExecutor are in unnamed module of loader java.net.URLClassLoader @15db9742)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.getExecutor(AbstractNoSqlLockService.java:87)
        at liquibase.ext.mongodb.lockservice.MongoLockService.existsRepository(MongoLockService.java:85)
        at liquibase.nosql.lockservice.AbstractNoSqlLockService.hasDatabaseChangeLogLockTable(AbstractNoSqlLockService.java:305)
        ... 42 more

This is the output for liquibase --version

Starting Liquibase at 15:38:38 (version 4.12.0 #3073 built at 2022-06-17 05:59+0000)
Liquibase Home: /opt/homebrew/Cellar/liquibase/4.12.0/libexec
Java Home /opt/homebrew/Cellar/openjdk/18.0.1.1/libexec/openjdk.jdk/Contents/Home (Version 18.0.1.1)
Libraries:
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/commons-collections4.jar: Apache Commons Collections 4.4.0
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/commons-lang3.jar: Apache Commons Lang 3.12.0
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/commons-text.jar: Apache Commons Text 1.9.0
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/connector-api.jar: connector-api UNKNOWN
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/h2.jar: H2 Database Engine 2.1.212
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/hsqldb.jar: HSQLDB 2.5.2
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/jaxb-api.jar: jaxb-api 2.3.1
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/jaxb-core.jar: JAXB Implementation 2.3.0.1
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/jaxb-runtime.jar: JAXB Runtime 2.3.6
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/jaybird.jar: Jaybird 4.0.6.java8 (build: variant=jaybird tag=v4.0.6 date=202204271624)
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/jcc.jar: IBM JCC JDBC 4 Driver 1.4.0
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/liquibase-mongodb-4.12.0.jar: liquibase-mongodb-4.12.0 UNKNOWN
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/mariadb-java-client.jar: mariadb-java-client 3.0.4
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/mongo-java-driver-3.9.1.jar: mongo-java-driver 3.9.1
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/mssql-jdbc.jar: Microsoft JDBC Driver for SQL Server 10.2.1
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/ojdbc8.jar: JDBC 21.5.0.0.0
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/opencsv.jar: opencsv 5.6.0
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/picocli.jar: picocli 4.6.3
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/postgresql.jar: PostgreSQL JDBC Driver 42.3.4
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/snakeyaml.jar: SnakeYAML 1.30.0
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/snowflake-jdbc.jar: snowflake-jdbc 3.13.19
- /opt/homebrew/Cellar/liquibase/4.12.0/libexec/internal/lib/sqlite-jdbc.jar: SQLite JDBC 3.36.0.3


Liquibase Version: 4.12.0
Liquibase Community 4.12.0 by Liquibase

How can we resolve this issue?

@jmayday
Copy link

jmayday commented Aug 23, 2022

We are trying to set up liquibase for our MongoDB schema migration management. We are facing the following issue when we run liquibase update

Log output for liquibase updateSQL --log-level debug

How can we resolve this issue?

So you mean update or update-sql? Those are different commands and only former is present on list of supported commands for mongodb (scroll down to Supported commands link)

@kataggart kataggart removed the project label Sep 19, 2022
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

3 participants