flink-connector-kafka 衝突

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檢查下java

資料1apache

資料2oop

個人博客即將同步至騰訊雲+社區,邀請你們一同入駐:https://cloud.tencent.com/developer/support-plan?invite_code=21pyvxnxazj4c.net

相關文章
相關標籤/搜索