Caused by: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.9.6

Posted 王小雷-多面手

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Caused by: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.9.6相关的知识,希望对你有一定的参考价值。

问题:spark实时处理数据报错 Spark Structured Streaming kafka 报错 Caused by: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.9.6

问题在于spark目前使用的Jackson是2.6+,而storm-kafka-client和kafka使用的是2.9+,两者之间gradle默认使用最新的依赖2.9+,所以spark structure Streaming程序运行时报错,不兼容jackson高版本。

解决:

gradle 修改如下

    compile (group: 'org.apache.storm', name: 'storm-kafka-client', version: '1.2.2')
       //解决与spark core jackson版本冲突
        exclude group:"com.fasterxml.jackson.core"
    
    compile (group: 'org.apache.kafka', name: 'kafka_2.11', version: '1.1.1')
        exclude group:"com.fasterxml.jackson.core"
    

正常运行

以上是关于Caused by: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.9.6的主要内容,如果未能解决你的问题,请参考以下文章

Hang caused by GC

Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:20880 Caused by: ja

Mathematical Problems Caused by CCD

Caused by SSLError

Caused by: java.lang.NoClassDefFoundError:

caused by a circular import.