flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax" <mj...@apache.org>
Subject Flink and Clojure
Date Thu, 10 Dec 2015 16:05:01 GMT
Hi Squirrels,

I was playing with a Flink Clojure WordCount example today.

After building the project with "mvn package" I tried to submit it to a
local cluster. Before I started the cluster, I manually copied
"clojure-1.5.1.jar" into Flink's lib folder.

> cp ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar lib/
> bin/start-local.sh

However, when submitting the jar, I get an exception:

> bin/flink run -c org.apache.flink.clojure.WordCount

> ------------------------------------------------------------
> The program finished with the following exception:
> org.apache.flink.client.program.ProgramInvocationException: The program's entry point
class 'org.apache.flink.clojure.WordCount' threw an error during initialization.
> at org.apache.flink.client.program.PackagedProgram.loadMainClass(PackagedProgram.java:585)
> at org.apache.flink.client.program.PackagedProgram.<init>(PackagedProgram.java:195)
> at org.apache.flink.client.CliFrontend.buildProgram(CliFrontend.java:784)
> at org.apache.flink.client.CliFrontend.run(CliFrontend.java:288)
> at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1050)
> at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1103)
> Caused by: java.lang.ExceptionInInitializerError
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:278)
> at org.apache.flink.client.program.PackagedProgram.loadMainClass(PackagedProgram.java:578)
> ... 5 more
> Caused by: java.io.FileNotFoundException: Could not locate org/apache/flink/clojure/WordCount__init.class
or org/apache/flink/clojure/WordCount.clj on classpath:
> at clojure.lang.RT.load(RT.java:443)
> at clojure.lang.RT.load(RT.java:411)
> at clojure.core$load$fn__5018.invoke(core.clj:5530)
> at clojure.core$load.doInvoke(core.clj:5529)
> at clojure.lang.RestFn.invoke(RestFn.java:408)
> at clojure.lang.Var.invoke(Var.java:415)
> at org.apache.flink.clojure.WordCount.<clinit>(Unknown Source)
> ... 8 more

I am not sure why the class is not found. It is contained in the jar
file. I can fix this error by copying the user jar
(flink-clojure-0.10.0.jar) into Flink's lib-folder.

It seems, that Flink is not looking into the user-jar when loading this
class. Can anybody explain why?



View raw message