Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

[BUG] Caused by: java.lang.NoClassDefFoundError: scala/Product$class #33

Closed
HeathKang opened this issue Jan 13, 2020 · 2 comments
Closed

Comments

@HeathKang
Copy link

Describe the bug
Flink report error when run app :Caused by: java.lang.NoClassDefFoundError: scala/Product$class. And I get such info when search for this error:your scala version is 2.12.x but you are using libraries compiled in scala version 2.11. I also to check the flink scala version and docker image info show flink scala version is 2.12:

SCALA_VERSION=2.12",
"GPG_KEY=E2C45417BED5C104154F341085BACB5AEFAE3202",
 "FLINK_HOME=/opt/flink",
"FLINK_URL_FILE_PATH=flink/flink-1.9.1/flink-1.9.1-bin-scala_2.12.tgz",
"FLINK_TGZ_URL=https://www.apache.org/dyn/closer.cgi?action=download&filename=flink/flink-1.9.1/flink-1.9.1-bin-scala_2.12.tgz",
"FLINK_ASC_URL=https://www.apache.org/dist/flink/flink-1.9.1/flink-1.9.1-bin-scala_2.12.tgz.asc"

So I rebuild the app with change POM.xml to:

<scala.binary.version>2.12</scala.binary.version>
<scala.version>2.12.1</scala.version>
<PULSAR_FLINK_VERSION>2.4.1</PULSAR_FLINK_VERSION>

But it seems this lib didn't have any scala 2.12 version lib in repo.
So there is any plan to push scala 2.12 version lib to repo?

@sijie
Copy link
Member

sijie commented Jan 13, 2020

@HeathKang Thank you for reporting this issue. We will take a look at the issue this week and publish the related scala version as needed.

@yjshen
Copy link
Contributor

yjshen commented Feb 5, 2020

Since the repo has moved to java implementation, it is scala-free now. The only reason we still have _2.11 or _2.12 is that flink have different scala-versioned modules. You could build a 2.12 compatible version by simply changing scala.binary.version in pom.xml.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants