jelena.vukadinovic Posted October 21, 2015 Share Posted October 21, 2015 Hi, I am trying to create data source for my report to use, from iReports 5.6. Data source is a mongodb 3.x collection and to access it you need to provide username and password. I get this Error: net.sf.jasperreports.engine.JRException: not authorized for query on collection_name.system.namespaces I tried, as suggested: community.jaspersoft.com/questions/816104/ireport-5x-mongo-authentication-replica-set-authentication-failure and also tried: http://community.jaspersoft.com/jasperreports-server/issues/4976 I tried connecting to it from jasper server and got this: net.sf.jasperreports.engine.JRException: Successful connection but wrong authentication Thank you! Any help you can provide is greatly appreciated. Kind Regards, Jelena Link to comment Share on other sites More sharing options...
dl_1 Posted October 23, 2015 Share Posted October 23, 2015 Jelena,I was able to successfully connect to an instance of MongoDB 3.0 with Authentication with Jaspersoft Studio 6.1.1 by using the hack described in post http://community.jaspersoft.com/jasperreports-server/issues/4976With original driver (2.12.3) I got this error in MongoDB log:2015-10-23T19:31:08.297+0200 I ACCESS [conn111] Failed to authenticate USERNAME@DATABASE with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document 1. Copy the driver to proper location by replacing the original driver with a new one.cp /Users/denisl/Downloads/mongo-java-driver-2.13.2.jar /Applications/TIBCO Jaspersoft Studio 6.1.1.final/configuration/org.eclipse.osgi/bundles/29/1/.cp/lib/mongo-java-driver-2.12.3.jar2. Change the connection parameters so everything is in URI, remove entries for USERNAME and PASSWORD from their inputs.mongodb://USERNAME:PASSWORD@HOST:PORT/DATABASE3. Server log entry states:2015-10-23T19:54:27.655+0200 I ACCESS [conn136] Successfully authenticated as principal USERNAME on DATABASE Hope this post helps, Denis Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now