flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

[fix][cdc-connector][mysql] Fix NoClassDefFoundError when create new table in mysql cdc source

Open pengmide opened this issue 2 years ago • 5 comments

Prepare a Pull Request

Fixes: #3035

Motivation

When we package maven jar for flink-cdc-connector-mysql-cdc module, the flink-cdc-common moduel is excluded. So we can use org.apache.commons.lang3.StringUtils instead of com.ververica.cdc.common.utils.StringUtils and then mysql CDC run correctly when adding new source tables.

Modifications

Change the import of StringUtils from com.ververica.cdc.common.utils to org.apache.commons.lang3

pengmide avatar Jan 26 '24 01:01 pengmide

@leonardBang , @PatrickRen , @ruanhang1993 , @Shawn-Hx , Could you please help me review this PR?

pengmide avatar Jan 26 '24 02:01 pengmide

Maybe we should includes the flink-cdc-common moduel in flink-cdc-connector-mysql-cdc module? flink-cdc-connector-mysql-cdc also includes some class of flink-cdc-common, such as annotion. But it also seems that flink-cdc-common is too big for flink-cdc-connector-mysql-cdc. It's hard to make a choice.

loserwang1024 avatar Jan 26 '24 09:01 loserwang1024

I have also encountered Does NoClassDefFoundError. Is there a specific class

meicao2999 avatar Mar 28 '24 03:03 meicao2999

This pull request has been automatically marked as stale because it has not had recent activity for 60 days. It will be closed in 30 days if no further activity occurs.

github-actions[bot] avatar Aug 12 '24 00:08 github-actions[bot]