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
Using liquibase 4.8.0 and liquibase-mongodb extension 4.8.0. The issue is that in the AbstractRunCommandStatement class, there is a checkResponse() call to a Document which asks for key("ok") and tries to read it as a Double when it is an Integer.
Took me a while to get here, running Spring Boot + DocumentDB + liquibase. A few pointers to anyone who stumbles across this using a similar stack:
use the jks keystore method for attaining connectivity. If you use the programmatic approach with AbstractMongoConfig you won't have the ability to enable tls/ssl on the MongoConnection that liquibase maintains.
DocumentDB does not support Document Validation. So you'll need to set the liquibase.mongodb.supportsValidator System property to false. This can be done with something like System.setProperty("liquibase.mongodb.supportsValidator", "false");
add &retryWrites=false to the connection string liquibase uses.
Stack trace follows.
2022-03-13 11:12:19.752 ERROR 32116 --- [ restartedMain] c.talksoft.convapi.utils.LiquibaseUtils : Exception:
...
Caused by: liquibase.exception.DatabaseException: Could not execute
at liquibase.nosql.executor.NoSqlExecutor.execute(NoSqlExecutor.java:189)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1279)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1261)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:661)
... 128 common frames omitted
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
at org.bson.Document.getDouble(Document.java:278)
at liquibase.ext.mongodb.statement.AbstractRunCommandStatement.checkResponse(AbstractRunCommandStatement.java:77)
at liquibase.ext.mongodb.statement.AbstractRunCommandStatement.run(AbstractRunCommandStatement.java:60)
at liquibase.ext.mongodb.statement.AbstractRunCommandStatement.run(AbstractRunCommandStatement.java:55)
at liquibase.ext.mongodb.statement.AbstractRunCommandStatement.execute(AbstractRunCommandStatement.java:51)
at liquibase.ext.mongodb.statement.AbstractRunCommandStatement.execute(AbstractRunCommandStatement.java:36)
at liquibase.nosql.executor.NoSqlExecutor.execute(NoSqlExecutor.java:187)
... 131 common frames omitted
```
The text was updated successfully, but these errors were encountered:
Using liquibase 4.8.0 and liquibase-mongodb extension 4.8.0. The issue is that in the
AbstractRunCommandStatement
class, there is acheckResponse()
call to a Document which asks forkey("ok")
and tries to read it as a Double when it is an Integer.Took me a while to get here, running Spring Boot + DocumentDB + liquibase. A few pointers to anyone who stumbles across this using a similar stack:
AbstractMongoConfig
you won't have the ability to enable tls/ssl on the MongoConnection that liquibase maintains.liquibase.mongodb.supportsValidator
System property to false. This can be done with something likeSystem.setProperty("liquibase.mongodb.supportsValidator", "false");
&retryWrites=false
to the connection string liquibase uses.Stack trace follows.
The text was updated successfully, but these errors were encountered: