Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spark 2.1.1 : Parsed JSON values do not match with class constructor

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.

like image 629
Toren Avatar asked Jul 24 '17 07:07

Toren


1 Answers

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

like image 189
vaquar khan Avatar answered Nov 12 '22 15:11

vaquar khan