flink-connector-kafka 冲突

2019-03-05 16:18:25 浏览数 (1)

代码语言:javascript复制
java.lang.NoClassDefFoundError: org/apache/kafka/common/serialization/ByteArrayDeserializer  
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer09.setDeserializer(FlinkKafkaConsumer09.java:271)  
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer09.<init>(FlinkKafkaConsumer09.java:158)  
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer010.<init>(FlinkKafkaConsumer010.java:128)  
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer010.<init>(FlinkKafkaConsumer010.java:112)  
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer010.<init>(FlinkKafkaConsumer010.java:79)  
        at com.test.boot.FlinkKafkaTest.main(FlinkKafkaTest.java:94)  
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
        at java.lang.reflect.Method.invoke(Method.java:498)  
        at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:528)  
        at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:419)  
        at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:381)  
        at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:878)  
        at org.apache.flink.client.CliFrontend.run(CliFrontend.java:259)  
        at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1126)  
        at org.apache.flink.client.CliFrontend$2.call(CliFrontend.java:1173)  
        at org.apache.flink.client.CliFrontend$2.call(CliFrontend.java:1170)  
        at org.apache.flink.runtime.security.HadoopSecurityContext$1.run(HadoopSecurityContext.java:43)  
        at java.security.AccessController.doPrivileged(Native Method)  
        at javax.security.auth.Subject.doAs(Subject.java:422)  
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1781)  
        at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:40)  
        at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1169)  
Caused by: java.lang.ClassNotFoundException: org.apache.kafka.common.serialization.ByteArrayDeserializer  
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
        ... 24 more  

本地可以跑,on yarn异常,包冲突了lib检查下

资料1

资料2

我的博客即将同步至腾讯云 社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=21pyvxnxazj4c

0 人点赞