I wrote a Flink program to parse streaming data. I can run it without any problem. But when I make a jar file of that, the jar file is not run. To make jar file, I follow this path:
Flile ---> Project Structure ---> Artifacts ---> jar ---> From modules with dependencies
I change the directory for META-INF to resources. After that I build the artifact. The jar file is built; even though, I can not run it. When I want to run it, I receive this error:
Exception in thread "main" java.lang.Exception: Could not create actor system at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:276) at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:162) at org.apache.flink.runtime.metrics.util.MetricUtils.startMetricsActorSystem(MetricUtils.java:126) at org.apache.flink.runtime.minicluster.MiniCluster.start(MiniCluster.java:260) at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:120) at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1510) at PooyaCo.App.main(App.java:38)
Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.remote.artery'
The strange things is that I follow above steps to make jar file for helloworld program and the jar file is run without any issues. I think the problem is because of flink dependencies.
Would you please guide me to solve the issue?
Any help would be very much appreciated.
Yes, getting this setup correctly is non-trivial. Your best bet is to follow the quickstart guide in the documentation -- https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/projectsetup/java_api_quickstart.html -- which shows how to do this with both maven and gradle.