You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yanquan Lv (Jira)" <ji...@apache.org> on 2026/10/18 02:41:00 UTC

[jira] [Updated] (FLINK-36713) NoSuchMethodError: PostgresConnection with PostgresIncrementalSource at runtime

     [ https://issues.apache.org/jira/browse/FLINK-36713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yanquan Lv updated FLINK-36713:
-------------------------------
    Fix Version/s:     (was: cdc-3.3.1)

> NoSuchMethodError: PostgresConnection with PostgresIncrementalSource at runtime
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-36713
>                 URL: https://issues.apache.org/jira/browse/FLINK-36713
>             Project: Flink
>          Issue Type: Bug
>          Components: Flink CDC
>    Affects Versions: cdc-3.2.0
>            Reporter: Mohsen Rezaei
>            Priority: Critical
>
> Running into the following error while trying to read from Postgres with Flink CDC:
> {code:java}
> Caused by: java.lang.NoSuchMethodError: 'void io.debezium.connector.postgresql.connection.PostgresConnection.<init>(io.debezium.jdbc.JdbcConfiguration, io.debezium.connector.postgresql.connection.PostgresConnection$PostgresValueConverterBuilder, java.lang.String, io.debezium.jdbc.JdbcConnection$ConnectionFactory)'
> 	at org.apache.flink.cdc.connectors.postgres.source.PostgresDialect.openJdbcConnection(PostgresDialect.java:89)
> 	at org.apache.flink.cdc.connectors.postgres.source.PostgresDialect.discoverDataCollections(PostgresDialect.java:159)
> 	at org.apache.flink.cdc.connectors.postgres.source.PostgresDialect.discoverDataCollections(PostgresDialect.java:64)
> 	at org.apache.flink.cdc.connectors.postgres.source.PostgresSourceBuilder$PostgresIncrementalSource.createEnumerator(PostgresSourceBuilder.java:314)
> 	at org.apache.flink.cdc.connectors.postgres.source.PostgresSourceBuilder$PostgresIncrementalSource.createEnumerator(PostgresSourceBuilder.java:296)
> 	at org.apache.flink.runtime.source.coordinator.SourceCoordinator.start(SourceCoordinator.java:225)
> 	... 34 common frames omitted
> {code}
> Reading through the code, it's documented that class containing the [{{PostgresConnection}} constructor|https://github.com/apache/flink-cdc/blob/d9ceee050bb1b6cf6bd8e2d285e22602a424d1c1/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java#L143] that the job is complaining about, [was copied from the same {{io.debezium.connector.postgresql.connection}} package|https://github.com/apache/flink-cdc/blob/d9ceee050bb1b6cf6bd8e2d285e22602a424d1c1/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java#L59] in the transitive dependency {{{}io.debezium:debezium-connector-postgres{}}}.
> This introduces an inconsistency at runtime depending on where the JARs end up in the JVM's classpath.
> What's the plan for resolving this issue and using a better practice to have a deterministic behavior at runtime?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)