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

Leonard Xu updated FLINK-36713:
-------------------------------
    Fix Version/s: cdc-3.3.1
                       (was: cdc-3.3.0)

> NoSuchMethodError: PostgresConnection with PostgresIncrementalSource ar 
> 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
>             Fix For: cdc-3.3.1
>
>
> 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)

Reply via email to