[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Could not build the program from JAR file.

Hi Florian,

The log you gave before prints the phrase "Use the help option (-h or --help) to get help on the command." and the log just shows "-yn" as a jar file that looks like yours. There is a problem with the parameter specification.

Can you share the full client log and your commit command?

Thanks, vino.

2018-08-07 15:22 GMT+08:00 Florian Simond <florian.simond@xxxxxxxxxx>:

In the log, I can see that:

First exception is a warning, not sure if it is important.

Second one seems to be the one. It tries to find the file "-yn" ???

2018-08-07 09:16:04,776 WARN  org.apache.flink.client.cli.CliFrontend                       - Could not load CLI class org.apache.flink.yarn.cli.FlinkYarnSessionCli.
java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(
        at org.apache.flink.client.cli.CliFrontend.loadCustomCommandLine(
        at org.apache.flink.client.cli.CliFrontend.loadCustomCommandLines(
        at org.apache.flink.client.cli.CliFrontend.main(
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        ... 5 more
2018-08-07 09:16:04,789 INFO  org.apache.flink.core.fs.FileSystem                           - Hadoop is not in the classpath/dependencies. The extended set of supported File Systems via Hadoop is not available.
2018-08-07 09:16:04,967 INFO  - Cannot create Hadoop Security Module because Hadoop cannot be found in the Classpath.
2018-08-07 09:16:04,991 INFO               - Cannot install HadoopSecurityContext because Hadoop cannot be found in the Classpath.
2018-08-07 09:16:05,041 INFO  org.apache.flink.client.cli.CliFrontend                       - Running 'run' command.
2018-08-07 09:16:05,046 INFO  org.apache.flink.client.cli.CliFrontend                       - Building program from JAR file
2018-08-07 09:16:05,046 ERROR org.apache.flink.client.cli.CliFrontend                       - Invalid command line arguments.
org.apache.flink.client.cli.CliArgsException: Could not build the program from JAR file.
        at org.apache.flink.client.cli.CliFrontend.parseParameters(
        at org.apache.flink.client.cli.CliFrontend.lambda$main$9(
        at org.apache.flink.client.cli.CliFrontend.main(
Caused by: JAR file does not exist: -yn
        at org.apache.flink.client.cli.CliFrontend.buildProgram(
        ... 4 more

De : vino yang <yanghua1127@xxxxxxxxx>
Envoyé : mardi 7 août 2018 09:01
À : Gary Yao
Cc : Florian Simond; user@xxxxxxxxxxxxxxxx
Objet : Re: Could not build the program from JAR file.
Hi Florian,

The error message is because of a FileNotFoundException, see here[1]. Is there any more information about the exception. Do you make sure the jar exist?

flink - Apache Flink

Thanks, vino.

2018-08-07 14:28 GMT+08:00 Gary Yao <gary@xxxxxxxxxxxxxxxxx>:
Hi Florian,

You write that Flink 1.4.2 works but what version is not working for you?


On Tue, Aug 7, 2018 at 8:25 AM, Florian Simond <florian.simond@xxxxxxxxxx> wrote:

Hi all,

I'm trying to run the wordCount example on my YARN cluster and this is not working.. I get the error message specified in title: Could not build the program from JAR file.

> $ ./bin/flink run -m yarn-cluster -yn 4 -yjm 1024 -ytm 4096 ./examples/batch/WordCount.jar
> Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set.
> Could not build the program from JAR file.

> Use the help option (-h or --help) to get help on the command.

I also have the same problem with a custom JAR...

With Flink 1.4.2, I have no problem at all. Both the WordCount example and my custom JAR are working...

What do I do wrong ?