-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Using debezium-source 5.0.0 (or 5.0.1, as far as I can tell) and configuring it for a mongo source I experience the following error at start time:
Debezium Engine completed with success:false, message:null
Exception in thread "debeziumPublisher.debezium:inbound-channel-adapter#0-thread-1" java.lang.NoSuchMethodError: 'com.mongodb.connection.SocketSettings$Builder com.mongodb.connection.SocketSettings$Builder.connectTimeout(int, java.util.concurrent.TimeUnit)'
at io.debezium.connector.mongodb.connection.client.DefaultMongoDbClientFactory.lambda$createMongoClientSettings$0(DefaultMongoDbClientFactory.java:43)
at com.mongodb.MongoClientSettings$Builder.applyToSocketSettings(MongoClientSettings.java:352)
at io.debezium.connector.mongodb.connection.client.DefaultMongoDbClientFactory.createMongoClientSettings(DefaultMongoDbClientFactory.java:42)
at io.debezium.connector.mongodb.connection.client.DefaultMongoDbClientFactory.<init>(DefaultMongoDbClientFactory.java:28)
at io.debezium.connector.mongodb.connection.MongoDbConnectionContext.<init>(MongoDbConnectionContext.java:42)
at io.debezium.connector.mongodb.MongoDbConnector.validateConnection(MongoDbConnector.java:124)
at io.debezium.connector.mongodb.MongoDbConnector.validate(MongoDbConnector.java:104)
at io.debezium.embedded.EmbeddedEngine.getConnectorConfig(EmbeddedEngine.java:512)
at io.debezium.embedded.EmbeddedEngine.run(EmbeddedEngine.java:422)
at io.debezium.embedded.ConvertingEngineBuilder$1.run(ConvertingEngineBuilder.java:163)
at org.springframework.integration.debezium.inbound.DebeziumMessageProducer.lambda$doStart$0(DebeziumMessageProducer.java:180)
at java.base/java.lang.Thread.run(Unknown Source)I did a little investigation and from what I can put together this image uses debezium core 2.6. Looking at its code it seems to expect, at least at build time, the version of mongo-driver-core (which contains the definition of the method connectTimeout) to be 4.11, which indeed defines the method so that it takes two arguments, one int and one TimeUnit.
However, at runtime it looks like the image uses a version of mongo-driver-core that is 5.0.1, and that version contains a definition of that method that accepts a long as first parameter, and would therefore justify the error we are seeing.
Is it possible that somewhere in the build process these dependencies are mis-versioned?
I can provide further details if needed
Thank you in advance