You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "zhisheng (Jira)" <ji...@apache.org> on 2020/11/05 09:49:00 UTC

[jira] [Created] (FLINK-19995) 【Flink SQL Client】Use Flink Kafka Connector has more one exception

zhisheng created FLINK-19995:
--------------------------------

             Summary: 【Flink SQL Client】Use Flink Kafka Connector has more one exception
                 Key: FLINK-19995
                 URL: https://issues.apache.org/jira/browse/FLINK-19995
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Kafka, Table SQL / Client
    Affects Versions: 1.12.0
            Reporter: zhisheng
         Attachments: image-2020-11-05-17-35-10-103.png, image-2020-11-05-17-37-21-610.png, image-2020-11-05-17-40-05-630.png, image-2020-11-05-17-41-01-319.png

when i add flink-sql-connector-kafka_2.11-1.12-SNAPSHOT.jar in lib, I run  sql job has an exception like picture2

 

!image-2020-11-05-17-35-10-103.png|width=658,height=251!

!image-2020-11-05-17-37-21-610.png|width=812,height=600!
{code:java}
[ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException: org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer
{code}
when i add flink-connector-kafka_2.11-1.12-SNAPSHOT.jar in lib, it run has another exception

 

!image-2020-11-05-17-41-01-319.png|width=841,height=318!

!image-2020-11-05-17-40-05-630.png|width=955,height=581!
{code:java}
[ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException: org.apache.kafka.common.serialization.ByteArrayDeserializer
{code}
if i add both jar, it returm exception too
{code:java}
[ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException: org.apache.kafka.common.serialization.ByteArrayDeserializer
{code}
ddl & sql:

 
{code:java}
CREATE TABLE UserBehavior (
 user_id BIGINT,
 item_id BIGINT,
 behavior CHAR(2),
 `time` BIGINT
) WITH (
 'connector' = 'kafka',
 'topic' = 'user_behavior',
 'properties.bootstrap.servers' = 'localhost:9092',
 'properties.group.id' = 'user_behavior_flink',
 'format' = 'json',
 'json.ignore-parse-errors' = 'true',  
 'scan.startup.mode' = 'earliest-offset',
 'scan.topic-partition-discovery.interval' = '10000'
);

select * from UserBehavior;{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)