When trying to execute a Flink job, I have this error message :
org.apache.flink.client.program.ProgramInvocationException: Neither a 'Main-Class', nor a 'program-class' entry was found in the jar file.
Although in my pom, I declare the main class as:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<archive>
<manifestEntries>
<Main-Class>com.package.Main</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
Can someone show me what I have missed ?
Thank you
It seems like an error on the mvn package
. Have you tried the following command?
./bin/flink run -c your.main.class flinkprogram.jar
Try to declare the main class with the following entry in pom.xml
:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<archive>
<manifest>
<mainClass>com.package.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With