今天起动flink ./sql-client.sh 异常如下
./sql-client.sh embedded
No default environment specified.
Searching for '/data/flink-1.11.2/conf/sql-client-defaults.yaml'...found.
Reading default environment from: file:/data/flink-1.11.2/conf/sql-client-defaults.yaml
No session environment specified.
Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected exception. This is a bug. Please consider filing an issue.
at org.apache.flink.table.client.SqlClient.main(SqlClient.java:213)
Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Could not create execution context.
at org.apache.flink.table.client.gateway.local.ExecutionContext$Builder.build(ExecutionContext.java:870)
at org.apache.flink.table.client.gateway.local.LocalExecutor.openSession(LocalExecutor.java:227)
at org.apache.flink.table.client.SqlClient.start(SqlClient.java:108)
at org.apache.flink.table.client.SqlClient.main(SqlClient.java:201)
Caused by: java.lang.NoClassDefFoundError: org/apache/flink/streaming/connectors/kafka/KafkaTableSourceSinkFactoryBase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
无脑百度半小时才找到一位大佬的解决办法,我自己也记下笔记
2、去如下地址下载
https://nightlies.apache.org/flink/flink-docs-release-1.11/dev/table/connectors/kafka.html
3、截图如下,下载好
4、删掉原来目录下kafka包
# 进入到目录(你自己安装的flink) flink/lib/
rm -rf flink-connector-kafka_2.12-1.11.2.jar
5、上传下载好的包到 flink/lib
6、启动成功
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)