Jump to content
We've recently updated our Privacy Statement, available here ×

How to build a Data Adapter for MongoDB


stepheboii

Recommended Posts

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

Link to comment
Share on other sites

  • 2 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...