flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Stehler <jared.steh...@intellifylearning.com>
Subject Re: Getting java.lang.ClassNotFoundException: for protobuf generated class
Date Wed, 22 Nov 2017 14:54:34 GMT
Protobuf is notorious for throwing things like “class not found” when built
and run with different versions of the library; I believe flink is using
protobuf 2.5.0 and you mentioned using 2.6.1, which I think would be a
possible cause of this issue.

Jared Stehler
Chief Architect - Intellify Learning
o: 617.701.6330 x703 <(617)%20701-6330>

On Nov 22, 2017, at 4:25 AM, Nico Kruber <nico@data-artisans.com> wrote:

But wouldn't a failed dependency show another ClassNotFoundException?

On Tuesday, 21 November 2017 20:31:58 CET Gordon Weakliem wrote:

Isn't one cause for ClassNotFoundException that the class can't load due to
failed dependencies or a failure in a static constructor?

If jar -tf target/program.jar | grep MeasurementTable shows the class is
present, are there other dependencies missing? You may need to add runtime
dependencies into your pom or gradle.build file.

On Tue, Nov 21, 2017 at 2:28 AM, Nico Kruber <nico@data-artisans.com> wrote:

Hi Shankara,
sorry for the late response, but honestly, I cannot think of a reason that
some of your program's classes (using only a single jar file) are found
others are not, except for the class not being in the jar.

Or there's some class loader issue in the Flink Beam runner (which I find
unlikely though) - maybe Aljoscha (cc'd) can elaborate a bit more on the
side and has some other idea.


On Tuesday, 14 November 2017 14:54:28 CET Shankara wrote:

Hi Nico,

- how do you run the job?

If we run same program in flink local then it works fine. For

flink local we used command line

         mvn package exec:java

--broker=" -Pflink-runner

      When we use flink cluster and submit jar using web UI then we are

getting exception. like below



    Exception :



- how do you add/include the jar with the missing class?

We are generating the linked jar using the maven-jar-plugin.


in the bundled jar all the protobuf generated class exist. There is no
missing class.

- is that jar file part of your program's jar or separate?

since we are using the jar-plugin, the protobuf jar is also


of the generated jar.

- is the missing class, i.e. "com.huawei.ccn.intelliom.ims.


$measurementTable" (an inner class starting in lower-case?), really in


file? It might be a wrongly generated protobuf class ...

sub Class is exit in Protobuf generated class. Please find the

attached class.





Sent from:

View raw message