Piotr Prądzyński
03/27/2025, 4:10 PMMongoSource based on this documentation: https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/connectors/datastream/mongodb/ . I'm using maven for dependencies and I even started the project from recommended maven archetype. I've tried several versions and no matter what I choose I'm getting such error while running the job:
Caused by: java.lang.NoSuchMethodError: 'void org.apache.flink.connector.base.source.reader.fetcher.SingleThreadFetcherManager.<init>(org.apache.flink.connector.base.source.reader.synchronization.FutureCompletingBlockingQueue, java.util.function.Supplier)'
at org.apache.flink.connector.mongodb.source.reader.MongoSourceReader.<init>(MongoSourceReader.java:56)
at org.apache.flink.connector.mongodb.source.MongoSource.createReader(MongoSource.java:145)
at org.apache.flink.streaming.api.operators.SourceOperator.initReader(SourceOperator.java:346)
I've even found some sample code done by other dev and I was hoping to run the example with his dependencies but with no luck. I'm getting similar issue, which is totally weird for me.
Could anyone have any idea how to fix this? Maybe any of you have real working setup with MongoSource to share?Aleksandr Pilipenko
03/27/2025, 4:15 PMAleksandr Pilipenko
03/27/2025, 4:17 PMPiotr Prądzyński
03/28/2025, 8:16 AM<flink.version>1.17.1</flink.version>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<!-- Add connector dependencies here. They must be in the default scope (compile). -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-base</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-mongodb</artifactId>
<version>1.0.1-1.17</version>
</dependency>Piotr Prądzyński
03/28/2025, 8:17 AMAleksandr Pilipenko
03/28/2025, 9:35 AMBut I’m running this on 2.0 server. Is is possible that this is the problem?yes, this is a problem since you’re using Flink 1.17 to build your application, you also need to run it on 1.17 server