Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL CDC compatible jar version need to be specified #7243

Open
ramindu90 opened this issue Sep 12, 2023 · 0 comments
Open

MySQL CDC compatible jar version need to be specified #7243

ramindu90 opened this issue Sep 12, 2023 · 0 comments

Comments

@ramindu90
Copy link
Member

Description:
In documentation, current mysql connector version supported is mysql-connector-java-8.0.19.jar.
It is better to mention the version since using higher versions gives an error as below.

[2023-09-12 10:21:16,927] ERROR {io.siddhi.core.stream.input.source.Source} - Error on 'CDCWithListeningMode'. Connection to the database lost. Error while connecting at Source 'cdc' at 'insertSweetProductionStream'. Will retry in '5 sec'. io.siddhi.core.exception.ConnectionUnavailableException: Connection to the database lost. at io.siddhi.extension.io.cdc.source.CDCSource.lambda$connect$1(CDCSource.java:651) at io.debezium.embedded.EmbeddedEngine.run(EmbeddedEngine.java:882) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.apache.kafka.connect.errors.ConnectException: 'java.lang.String com.mysql.cj.CharsetMapping.getJavaEncodingForMysqlCharset(java.lang.String)' at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:241) at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:218) at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:848) ... 3 more Caused by: java.lang.NoSuchMethodError: 'java.lang.String com.mysql.cj.CharsetMapping.getJavaEncodingForMysqlCharset(java.lang.String)' at io.debezium.connector.mysql.MySqlValueConverters.charsetFor(MySqlValueConverters.java:333) at io.debezium.connector.mysql.MySqlValueConverters.converter(MySqlValueConverters.java:300) at io.debezium.connector.mysql.MySqlDefaultValueConverter.setColumnDefaultValue(MySqlDefaultValueConverter.java:401) at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.convertDefaultValueToSchemaType(CreateTableParserListener.java:146) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.lambda$exitColumnCreateTable$1(CreateTableParserListener.java:75) at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.runIfNotNull(MySqlAntlrDdlParser.java:353) at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.exitColumnCreateTable(CreateTableParserListener.java:55) at io.debezium.ddl.parser.mysql.generated.MySqlParser$ColumnCreateTableContext.exitRule(MySqlParser.java:4700) at io.debezium.antlr.ProxyParseTreeListenerUtil.delegateExitRule(ProxyParseTreeListenerUtil.java:64) at io.debezium.connector.mysql.antlr.listener.MySqlAntlrDdlParserListener.exitEveryRule(MySqlAntlrDdlParserListener.java:106) at org.antlr.v4.runtime.tree.ParseTreeWalker.exitRule(ParseTreeWalker.java:48) at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:30) at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28) at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28) at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28) at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28) at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:85) at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:326) at io.debezium.connector.mysql.SnapshotReader.lambda$readTableSchema$17(SnapshotReader.java:881) at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:556) at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:497) at io.debezium.connector.mysql.SnapshotReader.readTableSchema(SnapshotReader.java:879) at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:541) ... 3 more

Also, since 8.0.19 version contains vulnerabilities, better to upgrade the debezium version in the cdc extension as well.
Screenshot 2023-09-12 at 11 30 53 AM

Best Regards,
Ramindu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants