Replicat to Mongodb error - java.lang.NoSuchMethodError , java.lang.NoClassDefFoundError
(Doc ID 3037711.1)
Last updated on JULY 29, 2024
Applies to:
Oracle GoldenGate Big Data and Application Adapters - Version 21.14.0.0.0 and laterInformation in this document applies to any platform.
Symptoms
MongoDB version : 6.0.11 enterprise.
Replicat To MongoDB getting abend with errors - java.lang.NoSuchMethodError , java.lang.NoClassDefFoundError :
1. java.lang.NoSuchMethodError: com.mongodb.client.MongoCollection.insertOne(Ljava/lang/Object;)Lcom/mongodb/client/result/InsertOneResul
Exception in thread "main" java.lang.NoSuchMethodError: com.mongodb.client.MongoCollection.insertOne(Ljava/lang/Object;)Lcom/mongodb/client/result/InsertOneResult;
at oracle.goldengate.handler.mongodb.operations.InsertOperationHandler.process(InsertOperationHandler.java:117)
at oracle.goldengate.handler.mongodb.MongoDBHandler.operationAdded(MongoDBHandler.java:281)
at oracle.goldengate.datasource.DsEventManager$4.send(DsEventManager.java:437)
at oracle.goldengate.datasource.DsEventManager.distributeEvent(DsEventManager.java:119)
at oracle.goldengate.datasource.DsEventManager.fireOperationAdded(DsEventManager.java:446)
at oracle.goldengate.datasource.AbstractDataSource.fireOperationAdded(AbstractDataSource.java:482)
at oracle.goldengate.datasource.UserExitDataSource.addOperationToTransactionAndFireEvent(UserExitDataSource.java:2470)
at oracle.goldengate.datasource.UserExitDataSource.createOperation(UserExitDataSource.java:1702)
at oracle.goldengate.datasource.UserExitDataSource.createOperation(UserExitDataSource.java:1457)
2024-07-23 13:29:40 ERROR OGG-15051 Java or JNI exception:
java.lang.NoSuchMethodError: com.mongodb.client.MongoCollection.insertOne(Ljava/lang/Object;)Lcom/mongodb/client/result/InsertOneResult;.
2. java.lang.ClassNotFoundException: com.mongodb.MongoBulkWriteException.
Exception in thread "main" java.lang.NoClassDefFoundError: com/mongodb/MongoBulkWriteException at oracle.goldengate.handler.mongodb.MongoDBHandlerFactory.instantiateHandler(MongoDBHandlerFactory.java:26) at oracle.goldengate.datasource.conf.DsHandler.getDataSourceListener(DsHandler.java:290) at oracle.goldengate.datasource.factory.DataSourceFactory.getHandlers(DataSourceFactory.java:262) at oracle.goldengate.datasource.factory.DataSourceFactory.getDataSource(DataSourceFactory.java:155) at oracle.goldengate.datasource.UserExitDataSourceLauncher.<init>(UserExitDataSourceLauncher.java:45) at oracle.goldengate.datasource.UserExitMain.main(UserExitMain.java:109) Caused by: java.lang.ClassNotFoundException: com.mongodb.MongoBulkWriteException at java.net.URLClassLoader.findClass(URLClassLoader.java:387) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:359) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 6 more 2024-07-23 14:53:34 WARNING OGG-00869 java.lang.ClassNotFoundException: com.mongodb.MongoBulkWriteException.
2024-07-23 14:53:34 ERROR OGG-15051 Java or JNI exception: java.lang.NoClassDefFoundError: com/mongodb/MongoBulkWriteException.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |