How to fix this issue

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 ‘app’)

I suppose the natural first question would be what the command you were running was? What database are you running against?

Did this issue get resolved? I am getting exactly same error. I am trying to connect to MongoDB. I have copied liquibase-mongodb-4.7.0.jar and mongo-java-driver-3.9.1.jar under\lib folder (where other jar files are there. I am using Liquibse 4.7 version. When I run "liquibase status"command it runs successfully but when I run “liquibase update-sql” or "liquibase update"I am getting this error. I am using changelog file in following article.

My URL looks liekbelow.

url=mongodb+srv://XXXXXXX.mongodb.net/DbName

I am also running into this same issue here and cannot find any resolution after much searching and troubleshooting.

OS: Windows 10
MongoDB: 5.0.10
Java: 8.0.3410.10
Liquibase: 4.14.0
MongoDB Liquibase Extension: 4.14.0
Mongo Java Driver: 3.12.11
Failing Command: ‘liquibase update-sql’

I have tried downgrading Liquibase to multiple different versions through 4.4, but the same error persists in all. The weird thing is that only the ‘update-sql’ command fails. Running ‘liquibase update’ works as expected.

Error message with v4.14.0
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 @555590)

Hi @broyer1591 , @spandya update-sql is not supported on MongoDB today. We will update the documentation as necessary.