问题
Due to recent Mogodb upgrade to 3.6, pentaho kettle mongoinput step aggregation not be able to fetch data from the Mongodb.
The error message:
com.mongodb.MongoCommandException: Command failed with error 9: 'The 'cursor' option is required, except for aggregate with the explain argument' on server localhost:2915. The full response is { "ok" : 0.0, "errmsg" : "The 'cursor' option is required, except for aggregate with the explain argument", "code" : 9, "codeName" : "FailedToParse" }
It seems that I need to upgrade mongodb driver for the pentaho, so I've downloaded mongodb-driver-3.6.3.jar file and saved it inside pentaho-server\pentaho-solutions\system\karaf\system\org\mongodb\mongo-java-driver\3.6.3, but the issue still exists.
I don't really know what to do to upgrade the driver and whether there is additional configuration associated with it or not.
Can anyone help me to resolve this issue?
回答1:
To use a new version, you need to:
- download new version (for example https://oss.sonatype.org/content/repositories/releases/org/mongodb/mongo-java-driver/3.7.1/mongo-java-driver-3.7.1.jar) to directory system/karaf/system/org/mongodb/mongo-java-driver/3.7.1 (where 3.7.1 is version of mongo driver - 3.7.1 works fine with mongo 3.6 too)
- point in configuration (system/karaf/system/pentaho/pentaho-karaf-features/7.0.0.0-25/pentaho-karaf-features-7.0.0.0-25-standard.xml) a new version of module mongo-java-driver
- remove cache (system/karaf/caches/) to allow rebuild it.
来源:https://stackoverflow.com/questions/49039298/pentaho-bi-mongodb-input-aggregation-error-due-to-recent-mongodb-upgrade-to-3