7

I've a strange problem with spark 2.1.1 and json4s.jackson.

I upgraded my streaming project from spark 1.5.1. Now when I execute code in IDE everything works fine.

But after assembly and code standalone execution with spark-submit

I got the following error

Caused by: org.json4s.package$MappingException: Parsed JSON values do not match with class constructor
args=
arg types=
constructor=  

My Environemnt:

  • spark=2.1.1,
  • scala=2.11,
  • json4s-jackson=3.2.11

Has somebody has faced the same problem before? If yes, how did you solve it?

Many thanks.

philantrovert
  • 9,904
  • 3
  • 37
  • 61
Toren
  • 6,648
  • 12
  • 41
  • 62

2 Answers2

1

Seems Like json4s-jackson bug search in following link "Parsed JSON values do not match with class constructor"

https://recordnotfound.com/json4s-json4s-3177/issues

You need to modify your json

vaquar khan
  • 10,864
  • 5
  • 72
  • 96
  • I can find that bug in the link you've provided. But I don't know what I am supposed to do with it - it doesn't link to any ticket or solution. – akki Jan 28 '19 at 08:20
0

Upgrade to latest Spark vesrion 2.2.x solved the problem. Looks like bug in Spark 2.1.x fixed now in Spark 2.2.x

Toren
  • 6,648
  • 12
  • 41
  • 62