Issue:-
While connecting to the MongoDB atlas, following error has been occurred:-
MONGODB_22 - Mongo Query Error: Command failed with error 115 (CommandNotSupported): 'command insert is unsupported, correlationID = 179543fa79a5cba7e589f5b1' on server atlas-sql-653f56d6e2904d1155c97d0e-e54eg.a.query.mongodb.net:27017. The full response is {"ok": 0, "errmsg": "command insert is unsupported, correlationID = 179543fa79a5cba7e589f5b1", "code": 115, "codeName": "CommandNotSupported"} null
Solution:-
The query is failing due to the authentication issue. We have to provide a Username and Password in the JDBC string for the MongoDB Atlas.
mongodb+srv://<USERNAME>:<PASSWORD>@<MONGODB_ATLAS_URL>/?retryWrites=true&w=majority