jackson-module-scala
jackson-module-scala copied to clipboard
Deserialization error on Spark-shell or in Zeppelin notebook
I get the following error when I want to parse a String into a Scala case class in Spark shell or in a Zeppelin notebook:
com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class MyCaseClassName]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)
I use exactly the same code in a "normal" Spark job, bundled as jar, on the cluster without any trouble. So I guess there is some problem with the REPL/Zeppelin environment?
Scala 2.11.8 Spark 2.0.2 Zeppelin 0.6.2 fasterxml.jackson 2.8.4
I found a similar isse here: https://github.com/wg/jacks/issues/13 And as I read there: https://github.com/FasterXML/jackson-module-scala#caveats in some cases it could be a problem. So maybe in Spark shell or Zeppelin the class debug information is disabled?