java Flink local test failure (Could not create actor system)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

java Flink local test failure (Could not create actor system)

Vijayendra Yadav
Hi Team,

While running java flink project in local, I am facing following issues: Could not create actor system ; Caused by: java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V
Could you suggest does flink java project needs scala at run time? What versions might be incompatible.

Exception in thread "main" java.lang.Exception: Could not create actor system
at org.apache.flink.runtime.clusterframework.BootstrapTools.startLocalActorSystem(BootstrapTools.java:263)
at org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils$AkkaRpcServiceBuilder.createAndStart(AkkaRpcServiceUtils.java:341)
at org.apache.flink.runtime.minicluster.MiniCluster.createLocalRpcService(MiniCluster.java:793)
at org.apache.flink.runtime.minicluster.MiniCluster.start(MiniCluster.java:271)
at org.apache.flink.client.program.PerJobMiniClusterFactory.submitJob(PerJobMiniClusterFactory.java:87)
at org.apache.flink.client.deployment.executors.LocalExecutor.execute(LocalExecutor.java:81)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1812)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1713)
at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:74)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1699)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1681)
at com.xx.DisFlinkService.execute(DisFlinkService.java:92)
at com.xxx.DisFlinkEmrApplication.main(DisFlinkEmrApplication.java:17)
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 com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:114)
Caused by: java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V
at akka.util.Timeout.<init>(Timeout.scala:13)
at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:329)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:686)
at akka.actor.RobustActorSystem.<init>(RobustActorSystem.scala:47)
at akka.actor.RobustActorSystem$.internalApply(RobustActorSystem.scala:96)
at akka.actor.RobustActorSystem$.apply(RobustActorSystem.scala:70)
at akka.actor.RobustActorSystem$.create(RobustActorSystem.scala:55)
at org.apache.flink.runtime.akka.AkkaUtils$.createActorSystem(AkkaUtils.scala:125)
at org.apache.flink.runtime.akka.AkkaUtils.createActorSystem(AkkaUtils.scala)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:276)
at org.apache.flink.runtime.clusterframework.BootstrapTools.startLocalActorSystem(BootstrapTools.java:260)

Regards,
Vijay
Reply | Threaded
Open this post in threaded view
|

Re: java Flink local test failure (Could not create actor system)

Smile
Hi Vijay,

Since version 1.7 Flink builds with Scala version 2.11 (default) and 2.12.
Flink has APIs, libraries, and runtime modules written in Scala. Users of
the Scala API and libraries may have to match the Scala version of Flink
with the Scala version of their projects (because Scala is not strictly
backward compatible). See [1] for more information.

If using maven, artifactId of Flink components usually end with scala
version, such as flink-streaming-java_2.11 means it was built against Scala
2.11.

[1].
https://ci.apache.org/projects/flink/flink-docs-stable/flinkDev/building.html#scala-versions

Regards,
Smile



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: java Flink local test failure (Could not create actor system)

Vijayendra Yadav
Hi Smile,

Thanks for your clarification, it helped.

Thanks,
Vijay

> On Feb 28, 2021, at 7:06 PM, Smile <[hidden email]> wrote:
>
> Hi Vijay,
>
> Since version 1.7 Flink builds with Scala version 2.11 (default) and 2.12.
> Flink has APIs, libraries, and runtime modules written in Scala. Users of
> the Scala API and libraries may have to match the Scala version of Flink
> with the Scala version of their projects (because Scala is not strictly
> backward compatible). See [1] for more information.
>
> If using maven, artifactId of Flink components usually end with scala
> version, such as flink-streaming-java_2.11 means it was built against Scala
> 2.11.
>
> [1].
> https://ci.apache.org/projects/flink/flink-docs-stable/flinkDev/building.html#scala-versions
>
> Regards,
> Smile
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/