You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run tests from module integration-tests/mongodb in native mode. You can use command mvn clean verify -Pnative -f integration-tests/mongodb
Following exception should happen:
2021-05-24 12:06:36,062 ERROR [org.apa.cam.imp.eng.AbstractCamelContext] (main) Error starting CamelContext (camel-1) due to exception thrown: null: java.lang.NullPointerException
at com.mongodb.client.model.changestream.ChangeStreamDocumentCodec.<init>(ChangeStreamDocumentCodec.java:45)
at com.mongodb.client.model.changestream.ChangeStreamDocument.createCodec(ChangeStreamDocument.java:296)
at com.mongodb.client.internal.ChangeStreamIterableImpl.<init>(ChangeStreamIterableImpl.java:84)
at com.mongodb.client.internal.MongoCollectionImpl.createChangeStreamIterable(MongoCollectionImpl.java:380)
at com.mongodb.client.internal.MongoCollectionImpl.watch(MongoCollectionImpl.java:352)
at com.mongodb.client.internal.MongoCollectionImpl.watch(MongoCollectionImpl.java:347)
at org.apache.camel.component.mongodb.MongoDbChangeStreamsThread.initializeCursor(MongoDbChangeStreamsThread.java:51)
at org.apache.camel.component.mongodb.MongoDbChangeStreamsThread.init(MongoDbChangeStreamsThread.java:45)
at org.apache.camel.component.mongodb.MongoDbChangeStreamsConsumer.doStart(MongoDbChangeStreamsConsumer.java:69)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3474)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRouteConsumers(InternalRouteStartupManager.java:401)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartRouteConsumers(InternalRouteStartupManager.java:319)
at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:213)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:147)
at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:3177)
at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2861)
at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2812)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2507)
at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:94)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:139)
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:763)
at io.quarkus.runtime.Application.start(Application.java:90)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
Quarkus version: Running Quarkus native-image plugin on GraalVM Version 21.0.0.2 (Java Version 11.0.10+8-LTS-jvmci-21.0-b06)
The text was updated successfully, but these errors were encountered:
Describe the bug
MongoDb client does not contain registration for reflection of
ChangeStreamDocument
. Therefore it causes NPE in https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/client/model/changestream/ChangeStreamDocumentCodec.java#L44To Reproduce
You can use camel-quarkus and its test. Following change has to be present - apache/camel-quarkus#2642
Then you have to:
MongoDbProcessor.reflectiveClass
(https://github.com/apache/camel-quarkus/pull/2642/files#diff-a69e11de2fa675737)mvn clean verify -Pnative -f integration-tests/mongodb
Following exception should happen:
Quarkus version:
Running Quarkus native-image plugin on GraalVM Version 21.0.0.2 (Java Version 11.0.10+8-LTS-jvmci-21.0-b06)
The text was updated successfully, but these errors were encountered: