flink jar异常,类冲突可能原因:
报错如下
java.sql.SQLException: ERROR 2006 (INT08): Incompatible jars detected between client and server. Ensure that phoenix-[version]-server.jar is put on the classpath of HBase in every region server: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!
Caused by: java.lang.NoSuchMethodException: org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.newStub(com.google.protobuf.RpcChannel)
phoenix-5.0.0-cdh6.2.0-client.jar
和 hdfs 上的hdfs:///flink/lib/
jar冲突了,注意即使jar一模一样也不行。
原因
shell
flink run-application -t yarn-application -d -c com.xx.process \
-C file:///xxx/phoenix-5.0.0-cdh6.2.0-client.jar \
-Dyarn.provided.lib.dirs=hdfs:///flink/lib/ \
**.jar