[
https://issues.apache.org/jira/browse/FLINK-20109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17231381#comment-17231381
]
xuhaoran commented on FLINK-20109:
----------------------------------
CREATE TABLE kafkaTable (
> user_id BIGINT,
> item_id BIGINT,
> category_id BIGINT,
> behavior STRING,
> ts String
> ) WITH (
> 'connector' = 'kafka',
> 'topic' = 'xx',
> 'properties.bootstrap.servers' = 'xxxx:9092',
> 'properties.group.id' = 'testGroup',
> 'format' = 'json',
> 'scan.startup.mode' = 'earliest-offset'
> );
select * from kafkaTable;[~zhisheng] if I do like
[https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sqlClient.html]
,put the jar outside,and start cli like the link told ,the sql select * from
xx can show me the data
> 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)