Hi - I am trying to follow the tutorial on mongo db at : Using Liquibase with MongoDB | Liquibase Docs
The problem is in the example, it conencts to a local mongodb deployment and I want to connect to Mongo Atlas.
In the liquibase.properties file the advise is to put - “url: mongodb://hostname:27017/myDatabase”
However, Atlas URL should be “mongodb+srv://hostname:27017/myDatabase”
Liquibase does not seem to like this, it throws an exception:
Cannot find database driver: Driver class was not specified and could not be determined from the url
Surely connecting to mongo atlas should be possible? Please guide me as to how?
MongoDB support is provided by Liquibase extension, which means the additional functionality for the db platform is provided by the community (and is a good candidate for being pulled into liquibase core if it aligns).
I’ve never seen MongoDB Atlas being used, and so, I would recommend logging an issue so the maintainer can give the definitive response as to support, or add it if not present:
This successfully recognizes the driver and also makes the connection.
I checked with mongo if this format was likely to be deprecated at any stage and they said very unlikely
@spozza Above mentioned way is not working for me… It is giving me an error
Unexpected error running Liquibase: liquibase.exception.DatabaseException: Could not query for long
Could you please help where i am going wring ?
Would you share the exact liquibase command you are running? If you are using a liquibase.properties file, please share the info (esp. URL and classpath). Also will need to see your complete log, its not enough info to diagnose with just the error snippet.