Flink CDC Issue Import created FLINK-34861:
----------------------------------------------
Summary: [Bug] Inconsistent Kafka shading among cdc connectors
Key: FLINK-34861
URL: https://issues.apache.org/jira/browse/FLINK-34861
Project: Flink
Issue Type: Bug
Components: Flink CDC
Reporter: Flink CDC Issue Import
### Search before asking
- [X] I searched in the
[issues|https://github.com/ververica/flink-cdc-connectors/issues) and found
nothing similar.
### Flink version
1.14.3
### Flink CDC version
3.0.0
### Database and its version
MySQL 5.7
Mongo 4.4
### Minimal reproduce step
Put flink-sql-connector-tidb-cdc-3.0.0.jar,
flink-sql-connector-mysql-cdc-3.0.0.jar and
flink-sql-connector-mongodb-cdc-3.0.0.jar into lib folder at Flink home (Flink
1.14 in my case], then create a MySQL CDC table and submit a simple query like
select * from mysql_cdc_table, there would be an error:
`java.lang.NoClassDefFoundError: org/apache/kafka/connect/source/SourceRecord`
It's caused by inconsistent shading of Kafka classes. Only MySQL CDC connector
relocated Kafka classes, so if the classpath contains un-relocated classes from
other CDC connectors the above error occurs.
### What did you expect to see?
The cdc connectors would not have class conflicts.
### What did you see instead?
The cdc connectors have class conflicts.
### Anything else?
_No response_
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
---------------- Imported from GitHub ----------------
Url: https://github.com/apache/flink-cdc/issues/2984
Created by: [link3280|https://github.com/link3280]
Labels: bug,
Created at: Wed Jan 10 11:27:16 CST 2024
State: open
--
This message was sent by Atlassian Jira
(v8.20.10#820010)