skip to Main Content

I am trying to use the MongoDB connector with WSO2 Micro Integrator (MI) 4.1 following the provided steps (https://apim.docs.wso2.com/en/4.2.0/reference/connectors/mongodb-connector/mongodb-connector-example/)
However, I encounter a ClassNotFoundException when attempting to connect to MongoDB using the 6.x driver.

Details:

  1. WSO2 MI Version: 4.1
  2. MongoDB Connector Version: 2.0.0
  3. MongoDB Driver Version: 6.x

Issue: ClassNotFoundException
Steps Taken:

Followed the MongoDB connector example in the WSO2 documentation.
Placed the MongoDB driver JAR files in the lib directory.
Verified the classpath configuration in WSO2 MI.

Despite these steps, the exception persists.

Questions:

Is WSO2 MI 4.1 compatible with MongoDB 6.x drivers?
Are there any known compatibility issues or additional configurations required for this setup?
Would upgrading to a newer version of WSO2 MI resolve this issue?
Any insights or suggestions would be greatly appreciated. Thank you!

Additional Steps for MongoDB Connector v2.0.0 or Above:
Downloaded the following JARs and added them in to the <PRODUCT_HOME>/dropins folder:

  1. mongodb-driver-syn
  2. bson
  3. mongodb-driver-core

Despite these steps, the exception persists.

2

Answers


  1. Shall we try this jar file and see. It worked with MongoDB 7.

    https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver/3.12.2

    Login or Signup to reply.
  2. mongo-Java-driver: 3.12.2 with MongoDBconnector 2.0.0 working for WSO2 with MongoDB 6.x

    Thanks for the response

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search