databasebigdataolapapache-doris

Flink CDC (flink-doris-connector) MySQL to Doris sync fails with 'java.lang.NoSuchMethodError'


I am attempting to synchronize data from MySQL to Apache Doris using Apache Flink and the flink-doris-connector. The Flink job fails during initialization with a java.lang.NoSuchMethodError related to the Debezium MySQL connector.

Error Stack Trace:

java.lang.NoSuchMethodError: com.mysql.cj.CharsetMapping.getStaticJavaEncodingForMysqlCharset(Ljava/lang/String;)Ljava/lang/String; 

Solution

  • The mysql-cdc package introduction error caused, as shown in the figure below, the flink-sql-connector-xx fat package needs to be used.