Connecting to MongoDB using NiFi


I am trying to connect to MongoDB using DBCPConnectionPool in NiFi. I have given the details as follows.

I have included the following jar files as well:

But the connector seems to be just in ‘Enabling’ state and the following error can be seen.

ERROR: StandardControllerServiceNode[service=DBCPConnectionPool[id=115f11bf-139d-125f-3ba6-4ff6a443109], name=DBCPConnectionPool, active=true] Failed to invoke @OnEnabled method: org.apache.nifi.processor.exception.ProcessException:Driver class mongodb.jdbc.MongoDriver is not found
-Caused by: java.lang.ClassNotFoundException:mongodb.jdbc.MongoDriver

My mongoDB version is ‘6.0.1’ and my NiFi Version is 1.20.0.

Any help would be appreciated! Thank you!

This JDBC driver for MongoDB is not built or maintained by MongoDB, Inc. I think you’re going to have to ask for help from the maintainer, which looks to be


Thank Jeff. I tried with the cdata jar file and it works. Do you have any idea as to why it works with the cdata jar files only?

Getting the same error as mentioned above, is there any other drivers other than from cdata that can be used