in JasperReports Server 6.1, when trying to connect to a mongodb server on version 3.X with disabled MONGODB-CR authentification, JasperReports Server can not connect, giving the error message:
net.sf.jasperreports.engine.JRException: Successful connection but wrong authentication
The respective mongodb log shows that JasperReports Server is trying to connect via the method "MONGODB-CR", which is deprecated (https://jira.mongodb.org/browse/SERVER-17459):
2015-06-26T09:32:35.864+0000 I ACCESS [conn79] Failed to authenticate XXX@YYY with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document
Solution: when connecting to a mongodb server on version 3.X, the method "SCRAM-SHA1" should be used.
"Unsupported authMechanism: SCRAM-SHA-1"
at java.lang.Thread.run(Unknown Source)
thanks for this information.
You can hack it by replacing jar file:
for JasperSoft studio Eclipse you have to reame mongo-java-driver-2.13.2.jar to mongo-java-driver-2.12.3.jar
for Jaspersoft server it works without renaming
then, to have it working you need to pass username/password in the URI (don't use u/p fields as they won't work)
also put your user in the db as it seem not to work happily for admin database
works for cluster as well
I am having the same problem. I am trying to connect to a MongoDb 3.0 with wired tiger and authentication.
I tried the solution of replacing the driver file https://github.com/mongodb/mongo-java-driver/releases/download/r2.13.2/m...
but it didn't work. Any help you can provide is greatly appreciated.