How to build a Data Adapter for MongoDB

Hello,
I'm attempting to access a MongoDB with Jasper Report (6.20.0).

I entered the following URI into the database: mongodb:/cluster0.y09dxf4.mongodb.net:27017/sample analytics


The setting is one of the online MongoDb samples.

The error information are as follows:
net.sf.jasperreports.engine.JR
Cannot test MongoDB connection due to exception: Error establishing MongoDBConnection; Timed out after 30000 ms when connecting was the cause. Client view of cluster state has the following properties: type=UNKNOWN, servers=[address=cluster0.y09dxf4.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception=com.mongodb.MongoSocketException: cluster0.y09dxf4.mongodb.net, triggered by java.net.UnknownHostException: cluster0.y09dxf4.mon com.jaspersoft.mongodb.adapter's MongoDbConnection. (MongoDbConnection.java:86) method. In com.jaspersoft.mongodb.adapter, call MongoDbDataAdapterService.createConnection(MongoDbDataAdapterService.java:70). MongoDbDataAdapterService.test at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard (MongoDbDataAdapterService.java:91) At the com.jaspersoft.studio.utils.jobs $3.runOperations(AbstractDataAdapterWizard.java:154) function. Checked @ java.base/java.lang, RunnableWithProgress$1.run(CheckedRunnableWithProgress.java:51). Thread.run(Unknown Source) (Unknown Source)
Net.sf.JasperReports.Engine.JR is the root cause
Cannot test MongoDB connection due to timed out after 30000 milliseconds of waiting. Client view of cluster state has the following properties: type=UNKNOWN, servers=[address=cluster0.y09dxf4.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception=com.mongodb.MongoSocketException: cluster0.y09dxf4.mongodb.net, triggered by java.net.UnknownHostException: cluster0.y09dxf4.mon com.jaspersoft.mongodb.connection, MongoDbConnection.test (MongoDbConnection.java:192). MongoDbConnection. (MongoDbConnection.java:82)... 6 more

stepheboii's picture
Joined: Nov 19 2022 - 4:52am
Last seen: 1 week 2 days ago

0 Answers:

No answers yet
Feedback