Support Questions
Find answers, ask questions, and share your expertise

JsonMappingException in jackson databind when using zeppelin 0.6.0, spark 1.6.2 (via HDP 2.5.3.0)

Highlighted

JsonMappingException in jackson databind when using zeppelin 0.6.0, spark 1.6.2 (via HDP 2.5.3.0)

New Contributor

I'm using zeppelin 0.6.0, spark 1.6.2 (via HDP 2.5.3.0)

I'm trying to troubleshoot running the following in a spark interpreter in zeppelin:

val stringRDD = sc.parallelize(Seq(""" 
  { "isActive": false,
    "balance": "$1,431.73",
    "picture": "http://placehold.it/32x32",
    "age": 35,
    "eyeColor": "blue"
  }""",
   """{
    "isActive": true,
    "balance": "$2,515.60",
    "picture": "http://placehold.it/32x32",
    "age": 34,
    "eyeColor": "blue"
  }""", 
  """{
    "isActive": false,
    "balance": "$3,765.29",
    "picture": "http://placehold.it/32x32",
    "age": 26,
    "eyeColor": "blue"
  }""")
)

I see the following exception in the output

com.fasterxml.jackson.databind.JsonMappingException: Could not find creator property with name 'id' (in class org.apache.spark.rdd.RDDOperationScope)
 at [Source: {"id":"0","name":"parallelize"}; line: 1, column: 1]
 at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
 at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:843)
 at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:533)
 at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:220)
 at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
 at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:409)
 at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:358)
 at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:265)
 at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:245)
 at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:143)
 at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:439)
 at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:3668)
 at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3560)
 at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2580)
 at org.apache.spark.rdd.RDDOperationScope$.fromJson(RDDOperationScope.scala:85)
 at org.apache.spark.rdd.RDD$$anonfun$35.apply(RDD.scala:1637)
 at org.apache.spark.rdd.RDD$$anonfun$35.apply(RDD.scala:1637)
 at scala.Option.map(Option.scala:145)
etc

Looking at google, this seems to be because the spark interpreter is using the wrong dependency.

So I try adding the following dependency: `com.fasterxml.jackson.module:jackson-module-scala_2.10:2.4.4` to the interpreter.

Now when I try and run any paragraph, I get 'ERROR', but with no output and no error text at all:

11618-capture.png

Is there a solution that doesn't involve rebuilding Zeppelin with the right dependencies?

2 REPLIES 2
Highlighted

Re: JsonMappingException in jackson databind when using zeppelin 0.6.0, spark 1.6.2 (via HDP 2.5.3.0)

@Tom seeing the same thing for my spark code:



com.fasterxml.jackson.databind.JsonMappingException: Could not find creator property with name 'id' (in class org.apache.spark.rdd.RDDOperationScope)

 at [Source: {"id":"0","name":"parallelize"}; line: 1, column: 1]

	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)

I tried adding dependency but had no luck either.

z.load("com.fasterxml.jackson.cores:jackson-databind:2.4.4")
Highlighted

Re: JsonMappingException in jackson databind when using zeppelin 0.6.0, spark 1.6.2 (via HDP 2.5.3.0)

Expert Contributor

Zeppelin 0.6.0 has serveral critical bugs, I would suggest you to use zeppelin 0.6.2