I am trying to use liquibase-mongodb extension with Liquibase-maven -plugin
following are the versions i am using :
<liquibase-core.version>4.23.0</liquibase-core.version>
<liquibase-maven-plugin.version>4.23.0</liquibase-maven-plugin.version>
<liquibase-mongodb.version>4.23.0</liquibase-mongodb.version>
Below is my property file:
changeLogFile=src/main/resources/db/master.xml
url=mongodb://Insight.com:2052/web_db?authSource=web_db
username=user
password:password
driver=liquibase.ext.mongodb.database.MongoClientDriver
But when i try to execute using : mvn clean install it gives my this error:
[ERROR] Error setting up or running Liquibase:
[ERROR] liquibase.exception.LockException: liquibase.exception.DatabaseException: Could not execute: Command failed with error 13 (Unauthorized): 'not authorized on web_db to execute command
I am sure the user i am using has read and write both permissions, i am able to login with that user and execute all sort of DDL and DML. but its not working from liquibase.
Can someone please help ?
am i using the correct configurations?
Now that i have permissions set up correctly, i am trying to connect fine.
and able to execute changesets in liquibase SQL format as well.
but there is a demand in our project to use js files rather that liquibase SQL format.
so when i am trying to include js file i see following error Reason: java.lang.IllegalArgumentException: Mongodb cannot execute liquibase.statement.core.RawSqlStatement statements
and js file looks like…
var permissions = [
{
“permissionid” : NumberInt(501272), // Enable menu for connect
“levelid” : NumberInt(0)
}
];
var wIds = [861540480,861440039];
ok so @MikeOlivas i have been reading about the mongodb extension.
it appears its available only to the paid liquibase users which we are not as of this year.
so we cant implement liquibase in mongodb because developers in our team would like to stick to js script for writing mongo queries.