I am testing iReport 5.x on a Mongo Replica Set with authentication enabled. An error is being returned when I test the connection:
"Error: net.sf.jasperreports.engine.JRException: not authorized for query on... [our database name] .system.namespaces "
I can connect successfully on a MongoDB without authentication enabled. I can connect with other tools to the authenticated mongo replica set with no issues.
Has anyone else seen this issue, or have a suggestion for resolution. Two constraints are (1) must include replicaset usage and (2) must include authentication.
I too have this issue, and also the same signs of trouble attaching to mongo through the Jasperserver-pro (assume its the same driver being called)
Scenario: Rep-set with Auth on. can connect with other tools, locally. just not this MongoDB connector within Ireport 5.x /Jasperserver 5.1.0
I have attempted 3rd party connectors with same results.
This is a known bug, and comes from an issue between the JRS mongo driver in iReport and the error code changes in Mongo 2.4.
Attached is a replacement Jar for the JS MongoDB datasource that fixes this issue and allows you connect to MongoDB with replicasets as well as mongo 2.4. To install it; just replace your "js-mongodb-datasource-1.0.0.jar" in both iReport and JasperServer with the attached Jar.
in iReport the file is located in: /modules/ext/js-mongodb-datasource-1.0.0.jar
and in JasperServer in: /webapps/jasperserver-pro/WEB-INF/lib/js-mongodb-datasource-1.0.0.jar
This bug is fixed in 5.2