lukus Posted September 20, 2012 Share Posted September 20, 2012 Hi There,I want to connect to a MongoDB that has authentication enabled on it. It seems that iReport does not support this (seems very strange that this is the case). I'm wondering if there is some sort of work around. I would be happy to write a class that returns the fully authenticated connection but I need to know if/how I could impliment this from within iReport.Anyone got any tips or workarouds on how to get my mongodb playing nicely with iReport?Cheers Link to comment Share on other sites More sharing options...
mdahlman Posted September 21, 2012 Share Posted September 21, 2012 The MongoDB connector works well with authentication. That applies to iReport and to JasperReports Server. Can you post your version numbers? Link to comment Share on other sites More sharing options...
lukus Posted September 24, 2012 Author Share Posted September 24, 2012 Hi there,I'm running a mongodb on amazon with authenticartion at a db level (not server level).I'm running iReport Designer 4.7.0 with the MongoDbPlugin 0.14. When I ht the test button after setting up the "MongoDB Connection" I get a "...JRException: unauthorized"I've been using iReport for a long time but have been forced to use a different (far inferiorior product) while I sort this out/wait for a change. I'm hoping this is all down to my own stupidity! CheersLuke Link to comment Share on other sites More sharing options...
mschirrmeister Posted May 17, 2013 Share Posted May 17, 2013 Hi, If the mongodb connector works well with authentication, what are the steps that needed to get it to work? We are facing similar problems.We are running JasperReports 5.1 on JBoss 7. When we try to setup a datasource to mongo it always fails. From what I can see, the jasper server does not even try to authentication, even if username and password are specified. The jboss log shows the following.10:24:58,467 ERROR [com.jaspersoft.jasperserver.war.action.DataSourceAction] (http--0.0.0.0-8080-1) exception testing custom data source: net.sf.jasperreports.engine.JRException: not authorized for query on myLogging.system.namespaces at com.jaspersoft.mongodb.jasperserver.MongoDbDataSourceService.createConnection(MongoDbDataSourceService.java:98) [js-mongodb-datasource-1.0.0.jar:]at com.jaspersoft.mongodb.jasperserver.MongoDbDataSourceService.testConnection(MongoDbDataSourceService.java:105) [js-mongodb-datasource-1.0.0.jar:]at com.jaspersoft.jasperserver.war.action.DataSourceAction.testCustomDataSource(DataSourceAction.java:411) [jasperserver-war-jar-5.1.0.jar:] In the mongs router log I see the following.Fri May 17 06:24:49.969 [mongosMain] connection accepted from 10.6.166.128:51475 #490 (27 connections now open)But that's about it. There is not try to authenticate. Which make the error in the jboss log logical, because it's not authorized to do anything without being authenticated. Is this maybe a bug in 5.1? ThanksMarco Link to comment Share on other sites More sharing options...
marianol Posted August 7, 2013 Share Posted August 7, 2013 Indeed you are running into a bug in 5.1 and Mongo 2.4 check this post http://community.jaspersoft.com/questions/816104/ireport-5x-mongo-authentication-replica-set-authentication-failure for information on how to fix this. Link to comment Share on other sites More sharing options...
Solution lukus Posted September 20, 2013 Author Solution Share Posted September 20, 2013 Wow! A year later and the problem is resolved!! Replacing the js-mongodb-datasource-1.0.0.jar in my iReport app and for my server code did the trick! Link to comment Share on other sites More sharing options...
lukus Posted September 20, 2013 Author Share Posted September 20, 2013 BTW the ling above is to the patched version of the jar 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