flink1.12.2之后的版本和scala的兼容性问题
刚开始学习flink,使用flink1.12.3,scala2.12写了一个本地程序后,运行的起来就会报错,下面图里这种:
网上到处都找不到相关的解答,但是经过试验,只要将flink版本降到1.12.1程序就正常了,这是为什么呢?
堆栈信息如下:
Exception in thread "main" java.lang.Exception: Could not create actor system
at org.apache.flink.runtime.clusterframework.BootstrapTools.startLocalActorSystem(BootstrapTools.java:281)
at org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils$AkkaRpcServiceBuilder.createAndStart(AkkaRpcServiceUtils.java:361)
at org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils$AkkaRpcServiceBuilder.createAndStart(AkkaRpcServiceUtils.java:344)
at org.apache.flink.runtime.minicluster.MiniCluster.createLocalRpcService(MiniCluster.java:952)
at org.apache.flink.runtime.minicluster.MiniCluster.start(MiniCluster.java:288)
at org.apache.flink.client.program.PerJobMiniClusterFactory.submitJob(PerJobMiniClusterFactory.java:75)
at org.apache.flink.client.deployment.executors.LocalExecutor.execute(LocalExecutor.java:85)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1905)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1796)
at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:69)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1782)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1765)
at com.flnn.demo.WatermarkerDemo.main(WatermarkerDemo.java:51)
Caused by: java.lang.NoClassDefFoundError: akka/actor/ExtensionId$class
at org.apache.flink.runtime.akka.RemoteAddressExtension$.<init>(RemoteAddressExtension.scala:32)
at org.apache.flink.runtime.akka.RemoteAddressExtension$.<clinit>(RemoteAddressExtension.scala)
at org.apache.flink.runtime.akka.AkkaUtils$.getAddress(AkkaUtils.scala:804)
at org.apache.flink.runtime.akka.AkkaUtils.getAddress(AkkaUtils.scala)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:298)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startLocalActorSystem(BootstrapTools.java:279)
... 12 more
Caused by: java.lang.ClassNotFoundException: akka.actor.ExtensionId$class
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论