Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting NoSuchMethodError with scala 2.12.10 and spark 3.2.0 #1169

Open
ma6878 opened this issue Nov 7, 2022 · 2 comments
Open

Getting NoSuchMethodError with scala 2.12.10 and spark 3.2.0 #1169

ma6878 opened this issue Nov 7, 2022 · 2 comments

Comments

@ma6878
Copy link

ma6878 commented Nov 7, 2022

json4s: 3.7.0-M11

scala: 2.12.10

spark: 3.2.0

jdk: 1.8

I am getting the following error coming from spark:
java.lang.NoSuchMethodError: org.json4s.JsonDSL$.pair2Assoc(Lscala/Tuple2;Lscala/Function1;)Lscala/Tuple2;
at org.apache.spark.sql.types.StructType.jsonValue(StructType.scala:413) ~[spark-catalyst_2.12-3.2.0.jar:3.2.0]
at org.apache.spark.sql.types.StructType.jsonValue(StructType.scala:102) ~[spark-catalyst_2.12-3.2.0.jar:3.2.0]

Any idea why that would be. This is working with spark 3.0.0 and json4s 3.6.6.

@veromos
Copy link

veromos commented Nov 30, 2022

Hi,

I have similar issue after upgrading from :

  • scala 2.11 -> 2.12
  • spark 2.4 -> 3.1
  • keeping json4s version 3.5.3

I have this error coming from spark :
"Exception in User Class: java.lang.NoSuchMethodError : org.json4s.JsonDSL$.seq2jvalue(Lscala/collection/Traversable;Lscala/Function1;)Lorg/json4s/JsonAST$JArray;"

After upgrading json4s 3.5.3 to 4.1.0-M2, I have the following new error :
Caused by: java.lang.ClassNotFoundException: org.json4s.JsonAST$JValue

Any idea if there are incompabilities between spark or scala and json4s ?

@vietvudanh
Copy link

Same problem, anyone have insight on why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants