[ https://issues.apache.org/jira/browse/FLINK-20109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17231354#comment-17231354 ]
xuhaoran commented on FLINK-20109: ---------------------------------- try to restart the sql client or restart the cluster after add the jar,still Could not execute SQL statement. Reason: java.lang.ClassNotFoundException: org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer[~zhisheng] > java.lang.ClassNotFoundException: > org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer > ------------------------------------------------------------------------------------------------ > > Key: FLINK-20109 > URL: https://issues.apache.org/jira/browse/FLINK-20109 > Project: Flink > Issue Type: Bug > Components: Client / Job Submission > Affects Versions: 1.11.2 > Environment: macos 10.14.6 > flink 1.11.2 > Reporter: xuhaoran > Priority: Major > > 按照官网例子 加载Kafka的连接器需要下载flink-sql-connector-kafka_2.11-1.11.2.jar > 然后启动指令为./sql-client.sh embedded -lib xxx/ > 然后创建简单的sql语句 创建 Kafka table > 执行都ok > > 但如果flink-sql-connector-kafka_2.11-1.11.2.jar 放在classpath里面 启动./sql-client.sh > embedded ps -ef|grep java > 也可以看到当前classpath加载了flink-sql-connector-kafka_2.11-1.11.2.jar > 执行之前的创建kafka table 执行select * from table > 报错java.lang.ClassNotFoundException: > org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer > 怀疑类加载器有问题 > -- This message was sent by Atlassian Jira (v8.3.4#803005)