Closed miptildar closed 3 years ago
Hi @miptildar could be because it couldn't initialize the right JsonParser. Please see the issue https://github.com/liquibase/liquibase-mongodb/issues/53 Could please check if you have this in your logs: [2020-11-07 13:08:54] INFO [liquibase.servicelocator] Cannot load service: liquibase.parser.ChangeLogParser: Provider liquibase.nosql.parser.json.JsonNoSqlChangeLogParser could not be instantiated or: [2020-11-01 15:31:13] INFO [liquibase.servicelocator] Cannot load service: liquibase.parser.ChangeLogParser: liquibase.nosql.parser.json.JsonNoSqlChangeLogParser Unable to get public no-arg constructor Could be that you don't have dependencies in your classpath {liquibase_home}/lib: jackson-annotations-2.11.3.jar jackson-core-2.11.3.jar jackson-databind-2.11.3.jar
See README.md instructions: For the command line is required to copy to [liquibase]/lib libraries : jackson-annotations-2.11.3.jar, jackson-core-2.11.3.jar, jackson-databind-2.11.3.jar
Most probably is picked the default parser thus the document parameter is set as empty
Thank you! Your solution is correct.
I added these lines to the original Dockerfile and MongoDb started getting populated:
RUN wget -O /liquibase/lib/jackson-annotations-2.12.1.jar https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.12.1/jackson-annotations-2.12.1.jar
RUN wget -O /liquibase/lib/jackson-core-2.12.1.jar https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.12.1/jackson-core-2.12.1.jar
RUN wget -O /liquibase/lib/jackson-databind-2.12.1.jar https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.12.1/jackson-databind-2.12.1.jar
Thank you, and waiting for new feedback :)
I am running Liquibase MongoDb extension as a Docker image using a Dockerfile from the following repository: https://github.com/mmarcon/liquibase-mongo-docker
As a changelog I used this simple json:
Results
Liquibase is being run successfully, collection is being created, but no data is populated.
Here are Liquibase logs:
And a screenshot from MongoDb Compass
Could you say me, why data is not being populated?
┆Issue is synchronized with this Jira Bug by Unito