用的是flink1.12 quickstart mvn的工程模板,在工程里面一个类从kafka消费CDC数据,一个类从mysql消费CDC数据,如果mvn
pom文件这样配置 org.apache.flink
flink-connector-kafka_${scala.binary.version} ${flink.version}
org.apache.flink flink-connector-jdbc_${scala.binary.version}
${flink.version} 则kafka消费的应用执行成功,消费mysql的应用报Caused by:
org.apache.flink.table.api.ValidationException: Could not find any factory
for identifier 'jdbc' that implements
'org.apache.flink.table.factories.DynamicTableFactory' in the classpath.
如果把两个依赖的顺序换一下 org.apache.flink
flink-connector-jdbc_${scala.binary.version} ${flink.version}
org.apache.flink flink-connector-kafka_${scala.binary.version}
${flink.version} 则mysql消费的应用这些成功,消费kafka的应用报Caused by:
org.apache.flink.table.api.ValidationException: Could not find any factory
for identifier 'kafka' that implements
'org.apache.flink.table.factories.DynamicTableFactory' in the classpath.
--
Sent from:
http://apache-flink.147419.n8.nabble.com/