liquibase-mongodb
liquibase-mongodb copied to clipboard
WARNING: Unknown database: MongoDB
I am following the README.md
. The command
mvn clean install -Prun-its
failed on tests:
[INFO] Running liquibase.ext.mongodb.changelog.MongoHistoryServiceIT
Jul 27, 2020 1:42:19 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='100 ms', maxWaitQueueSize=500}
Jul 27, 2020 1:42:20 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Opened connection [connectionId{localValue:1, serverValue:553}] to localhost:27017
Jul 27, 2020 1:42:20 PM liquibase.database
WARNING: Unknown database: MongoDB
Jul 27, 2020 1:42:20 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[4, 2, 8]}, minWireVersion=0, maxWireVersion=8, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=12420417}
Jul 27, 2020 1:42:20 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='100 ms', maxWaitQueueSize=500}
Jul 27, 2020 1:42:20 PM liquibase.database
WARNING: Unknown database: MongoDB
...
[ERROR] MongoStatementIT>AbstractMongoIntegrationTest.setUp:59 » ClassCast liquibase.d...
[ERROR] MongoStatementIT>AbstractMongoIntegrationTest.setUp:59 » ClassCast liquibase.d...
[ERROR] RunCommandStatementIT>AbstractMongoIntegrationTest.destroy:46 » NullPointer
[ERROR] RunCommandStatementIT>AbstractMongoIntegrationTest.setUp:59 » ClassCast liquib...
[ERROR] RunCommandStatementIT>AbstractMongoIntegrationTest.setUp:59 » ClassCast liquib...
[ERROR] RunCommandStatementIT>AbstractMongoIntegrationTest.setUp:59 » ClassCast liquib...
[INFO]
[ERROR] Tests run: 91, Failures: 0, Errors: 91, Skipped: 0
The message
WARNING: Unknown database: MongoDB
is from liquibase-core https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/database/DatabaseFactory.java#L107
Before running the Maven, I ran Mongo and it showed connections:
docker run --rm --network host mongo
2020-07-27T09:03:06.918+0000 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2020-07-27T09:03:06.921+0000 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2020-07-27T09:03:06.922+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=centos7-vm
2020-07-27T09:03:06.922+0000 I CONTROL [initandlisten] db version v4.2.8
...
2020-07-27T09:42:23.378+0000 I NETWORK [conn627] received client metadata from 127.0.0.1:37374 conn627: { driver: { name: "mongo-java-driver|sync", version: "3.12.6" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "3.10.0-1127.13.1.el7.x86_64" }, platform: "Java/Oracle Corporation/1.8.0_201-b09" }
2020-07-27T09:42:23.386+0000 I NETWORK [listener] connection accepted from 127.0.0.1:37378 #629 (77 connections now open)
2020-07-27T09:42:23.387+0000 I NETWORK [conn629] received client metadata from 127.0.0.1:37378 conn629: { driver: { name: "mongo-java-driver|sync", version: "3.12.6" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "3.10.0-1127.13.1.el7.x86_64" }, platform: "Java/Oracle Corporation/1.8.0_201-b09" }
2020-07-27T09:42:23.948+0000 I NETWORK [conn601] end connection 127.0.0.1:37322 (76 connections now open)
2020-07-27T09:42:23.948+0000 I NETWORK [conn553] end connection 127.0.0.1:37226 (75 connections now open)
2020-07-27T09:42:23.948+0000 I NETWORK [conn614] end connection 127.0.0.1:37348 (74 connections now open)
Pls point me how to pass tests. Thanks.
I'm also facing the same issue, did any one got the solution for this.
@SarthazShaik, I'd like to add, that I received a response from Robert. Shortly, this extension does not work via liquibase CLI. Only Java call should work (I did not check).
Some quotes:
Do you have any ETA, related to:
We’re working on implementing the extension via CLI
We do not have an ETA on it. But, I would measure it in weeks, not months. Thanks!
Alexey Tsarev , I am getting the same issue (Unsupported database: Mongodb) with java call.
Thanks & Regards,
Shaik Sarthaz,
Software Engineer,
Coeurdata Software Pvt ltd.
From: Alexey Tsarev [email protected] Sent: Wednesday, August 5, 2020 6:03 PM To: liquibase/liquibase-mongodb [email protected] Cc: Sarthaz Shaik [email protected]; Mention [email protected] Subject: Re: [liquibase/liquibase-mongodb] WARNING: Unknown database: MongoDB (#28)
@SarthazShaikhttps://github.com/SarthazShaik, I'd like to add, that I received a response from Robert. Shortly, this extension does not work via liquibase CLI. Only Java call should work (I did not check).
Some quotas:
Do you have any ETA, related to:
We’re working on implementing the extension via CLI
We do not have an ETA on it. But, I would measure it in weeks, not months. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/liquibase/liquibase-mongodb/issues/28#issuecomment-669166268, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKVZVJDBVJHQFEWUIXCAV73R7FGRLANCNFSM4PISVEBQ.
@SarthazShaik, pls contact to Robert (for instance, use git log
to get his email)
I created a proof of concept, where I hacked together enough to get the CLI to work here: https://github.com/liquibase/liquibase-mongodb/pull/31
If you follow the README.md instructions it will guide you through getting it to work, and the included Dockerfile and Docker entrypoint download liquibase and run the included change logs.
It does require using the 4.0 version of liquibase and the runWith attribute.
I also don't think that PR will be merged as it's probably not the real way to implement it. But it was enough for me to get things running, so I thought I'd post it here.