Description
I hit the error below when attempting to use Kerberos authentication with the Java driver running as an OSGI module.
Caused by: java.lang.NoClassDefFoundError: javax/security/sasl/SaslException
|
at com.mongodb.DBPort.authenticate(DBPort.java:318)
|
at com.mongodb.DBPort.checkAuth(DBPort.java:333)
|
at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:243)
|
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)
|
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)
|
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)
|
at com.mongodb.DB.getCollectionNames(DB.java:399)
|
at org.pentaho.mongo.wrapper.NoAuthMongoClientWrapper.getCollectionsNames(NoAuthMongoClientWrapper.java:196)
|
... 118 more
|
Caused by: java.lang.ClassNotFoundException: javax.security.sasl.SaslException not found by org.mongodb.mongo-java-driver [21]
|
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
|
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
|
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
|
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
|
... 126 more
|
-----------------
I later added the following items to the Import-Package in the MANIFEST for mongo-java-driver-2.11.1.jar and was able to connect without issue.
javax.security.sasl,javax.security.auth.login,javax.security.auth,org.ietf.jgss
|