Flink Stateful Function: The program's entry point class not found in the jar file

Posted by flint-stone on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Flink-Stateful-Function-The-program-s-entry-point-class-not-found-in-the-jar-file-tp40269.html

Hello!
I'm trying to deploy a Flink stateful function as a flink jar and I followed the instruction here. However I'm getting the error saying that the program entry point class was not found in the jar even after I added the dependency in my pom.

Running:

bin/flink run -c org.apache.flink.statefun.flink.core.StatefulFunctionsJob flink-statefun/statefun-examples/statefun-greeter-example/target/statefun-greeter-example-2.3-SNAPSHOT.jar

Producing the following error:

org.apache.flink.client.program.ProgramInvocationException: The program's entry point class 'org.apache.flink.statefun.flink.core.StatefulFunctionsJob' was not found in the jar file. at org.apache.flink.client.program.PackagedProgram.loadMainClass(PackagedProgram.java:389) at org.apache.flink.client.program.PackagedProgram.<init>(PackagedProgram.java:139) at org.apache.flink.client.program.PackagedProgram.<init>(PackagedProgram.java:61) at org.apache.flink.client.program.PackagedProgram$Builder.build(PackagedProgram.java:557) at org.apache.flink.client.cli.CliFrontend.buildProgram(CliFrontend.java:726) at org.apache.flink.client.cli.CliFrontend.getPackagedProgram(CliFrontend.java:242) at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:223) at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:916) at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:992) at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30) at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:992) Caused by: java.lang.ClassNotFoundException: org.apache.flink.statefun.flink.core.StatefulFunctionsJob at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at org.apache.flink.util.FlinkUserCodeClassLoader.loadClassWithoutExceptionHandling(FlinkUserCodeClassLoader.java:61) at org.apache.flink.util.ChildFirstClassLoader.loadClassWithoutExceptionHandling(ChildFirstClassLoader.java:65) at org.apache.flink.util.FlinkUserCodeClassLoader.loadClass(FlinkUserCodeClassLoader.java:48) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.apache.flink.client.program.PackagedProgram.loadMainClass(PackagedProgram.java:387) ... 10 more
Here is my modified pom.xml. The original version of the pom file can be found here here. It seems that adding the extra dependency of statefun-flink-distribution has no effect. Any suggestions?

Thanks!

Le