title: Flink: The program's entry point class not found in the jar file
body: <p>I'm trying to deploy a Flink stateful function as a flink jar and I followed the instruction <a href="https://github.com/apache/flink-statefun" rel="nofollow noreferrer">here</a>. 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.</p>
  <p>Running:</p>
  <pre><code>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
  </code></pre>
  <p>Producing the following error:</p>
  <pre><code>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.&lt;init&gt;(PackagedProgram.java:139)
      at org.apache.flink.client.program.PackagedProgram.&lt;init&gt;(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
  </code></pre>
  <p>Here is my pom.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  &quot;License&quot;); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
  --&gt;
  &lt;project xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;parent&gt;
          &lt;artifactId&gt;statefun-examples&lt;/artifactId&gt;
          &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
          &lt;version&gt;2.3-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;..&lt;/relativePath&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;statefun-greeter-example&lt;/artifactId&gt;
  
      &lt;dependencies&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;statefun-sdk&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;statefun-kafka-io&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;statefun-flink-core&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;!-- The following exclusion is needed since this artifacts pulls two different versions
                       of slf4j, and thus failing the maven convergence plugging.
                   --&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.google.protobuf&lt;/groupId&gt;
                      &lt;artifactId&gt;protobuf-java&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;statefun-flink-distribution&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;!-- The following exclusion is needed since this artifacts pulls two different versions
                       of slf4j, and thus failing the maven convergence plugging.
                   --&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.google.protobuf&lt;/groupId&gt;
                      &lt;artifactId&gt;protobuf-java&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.protobuf&lt;/groupId&gt;
              &lt;artifactId&gt;protobuf-java&lt;/artifactId&gt;
              &lt;version&gt;3.8.0&lt;/version&gt;
          &lt;/dependency&gt;
          
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.github.os72&lt;/groupId&gt;
                  &lt;artifactId&gt;protoc-jar-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${protoc-jar-maven-plugin.version}&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;excludePackageNames&gt;org.apache.flink.statefun.examples.greeter.generated&lt;/excludePackageNames&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      
  &lt;/project&gt;
  </code></pre>
  <p>The original version of the pom file can be found here <a href="https://github.com/apache/flink-statefun/blob/master/statefun-examples/statefun-greeter-example/pom.xml" rel="nofollow noreferrer">here</a>. It seems that adding the extra dependency of <code>statefun-flink-distribution</code> has no effect. Any suggestions?</p>