FasterXML / jackson-module-scala

Add-on module for Jackson (https://github.com/FasterXML/jackson) to support Scala-specific datatypes
Apache License 2.0
501 stars 141 forks source link

Improve exception message for "Incompatible Jackson version" problem (indicate scala and databind versions) #265

Closed SeanShubin closed 8 years ago

SeanShubin commented 8 years ago

By "latest" I am referring to latest release version in maven central

As soon as you try to register the Scala module

val mapper = new ObjectMapper()
mapper.registerModule(DefaultScalaModule)

You will get "Incompatible Jackson version: 2.7.5" at com.fasterxml.jackson.module.scala.JacksonModule$class.setupModule(JacksonModule.scala:64)

The comment block around JacksomModule.scala has this to say:

    // Under semantic versioning, this check would not be needed; however Jackson
    // occasionally has functionally breaking changes across minor versions
    // (2.4 -> 2.5 as an example). This may be the fault of the Scala module
    // depending on implementation details, so for now we'll just declare ourselves
    // as incompatible and move on.
cowtowncoder commented 8 years ago

As per comment, this is intentional. While semantic versioning is used and supported for public API that users use (application code written to use an earlier 2.x will continue to work with later 2.x version), it is not supported (and possibly can not be supported) for integration mechanisms that module system requires. Newer versions of modules often require new version of core components, and sometimes older versions of extension modules do not implement things that newer core components require. As a result, the general rule is that minor versions of Jackson components should be the same: correct operation is not guaranteed for mismatches sets. Sometimes mismatched set could work, but trying to use such combination is asking for trouble.

Now: since many combinations of different minor versions across components will not work, it seems better to prevent attempts at using quite-likely-failing combination instead of just letting things process and failing in a more mysterious way.

In theory this particular check by Scala module could be refined to only block cases where Scala minor version is higher than that of jackson-databind: this is the case least likely to work. But since the general rule about Jackson components is that their minor versions should be the same, it is not clear that trying to support some subset of non-standard combinations would have much value.

SeanShubin commented 8 years ago

That makes sense, but perhaps there is a way to address the difficulty of someone who just grabs the latest version of each. It would be convenient for users if the solution to their compatibility problems were most often "just upgrade everything to the latest according to maven central". I agree that supporting non-standard combinations would not have much value, but I do see value in having the latest versions of each work most of the time, even if that could not be achieved all of the time in practice.

How hard is it, for example, to release jackson-module-scala at version 2.7.5, after testing it with jackson-databind 2.7.5? Is it a matter of not having confidence that the automated tests will catch compatibility problems if they exist? Or is it cumbersome to keep up with jackson-databind every time it upgrades?

christophercurrie commented 8 years ago

FWIW, the latest release of the Scala module is 2.7.4, which should be perfectly compatible with jackson-databind 2.7.5.

http://search.maven.org/#search%7Cga%7C1%7Cjackson-module-scala

Without that knowledge, a cursory glance at the README would have revealed mention of 2.6.5 and 2.7.2, both of which are later than the version in this issue.

Primary obstacles to releases are maintainer time which is voluntary and not infinite, no matter how small the demand.

SeanShubin commented 8 years ago

I did not realize that the latest Scala module was 2.7.4, but looking at maven central, I see how I made the mistake. It seems the last updated version according to maven central is 2.6.7 on 06-Jun-2016 but the latest version number is 2.7.4 on 02-Jun-2016. I will try fiddling with the versions of my pom.xml and see if that fixes my problem.

Completely understandable with respect to maintainer time. I was not trying to be demanding, just trying to get an idea of how hard it was in case I wanted to volunteer some of my own time to keep things up to date.

cowtowncoder commented 8 years ago

@SeanShubin Just to make sure, when I say "minor versions need to match", I mean that for jackson-databind 2.7.x, Scala version needs to be one of 2.7 versions as well. It need NOT be the same patch version (that is, 2.7.4 should be allowed with 2.7.5, for example). Check by Scala module was added to reduce times when users observe (and possibly report) a mysterious exception that occurs during usage, due to version discrepancy, but not indicated as such.

I fully agree in that we should try to release full set of components, and this is what we are trying to get to. There are sometimes delays with Scala module, since its build system is bit different, but we are getting better at reducing delay.

Finally one thing that would seem obvious is that the exception should include both Scala module version and databind version, if it does not yet do so -- without that information exception message can be very confusing. Looking at code I think message should indeed be improved.

/cc @nbauernfeind

SeanShubin commented 8 years ago

Turns out it was a problem with my integrated development environment. I did not explicitly specify the version of jackson-module-scala I was using, I let it get pulled in transitively. My IDE asked maven central what the latest timestamp was, so it grabbed 2.6.3 instead of 2.7.4. The solution was to explicitly specify the version in my pom.xml:

        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-scala_2.11</artifactId>
            <version>2.7.4</version>
        </dependency>
cowtowncoder commented 8 years ago

@SeanShubin ah. Interesting choice by IDE, I would have expected later version...

I think that the exception message could use some work, still, so thank you for bringing this up. It is too easy to overlook importance of proper error reporting, until you get hit by an issue like this.

SeanShubin commented 8 years ago

Well it depends on what you mean by "later". If you mean later by semantic version, you would expect 2.7.4. If you mean later by later in time, then you would expect 2.6.7. This is an unusual situation where the definition of "later" happens to be ambiguous.

http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.fasterxml.jackson.module%22%20AND%20a%3A%22jackson-module-scala_2.11%22

SeanShubin commented 8 years ago

I agree on the error reporting. I encourage people to think of error messages as the most important part of user interface design. Good error messages can change perception from "it's broken" to "oops, I did something wrong".

cowtowncoder commented 8 years ago

@SeanShubin What I mean is that for any project that maintains stable branches, you should never rely on timestamp ordering. It should be based on version number. It's perfectly normal to have, say, 2.7.0 be released before 2.6.7. In fact there are sometimes even 3 branches with releases, to support critical patches for older versions; not all users can upgrade to newest branches.

Anyway; there are many ways in which incompatible sets may come about, so reporting enough information is crucial.

SeanShubin commented 8 years ago

Yep, that makes sense.

sudhanshulenka commented 8 years ago

I am facing this issue after using 2.8.2 version for Jackson and scala jackson Caused by: com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.8.2 requires Jackson Databind version >= 2.8.0 and < 2.9.0 at com.fasterxml.jackson.module.scala.JacksonModule$class.setupModule(JacksonModule.scala:66) at com.fasterxml.jackson.module.scala.DefaultScalaModule.setupModule(DefaultScalaModule.scala:18) at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:730) at com.metamx.common.scala.Jackson$$anonfun$newObjectMapper$1.apply(Jackson.scala:70) at com.metamx.common.scala.Jackson$$anonfun$newObjectMapper$1.apply(Jackson.scala:68) at com.metamx.common.scala.Predef$EffectOps.withEffect(Predef.scala:44) at com.metamx.common.scala.Jackson$class.newObjectMapper(Jackson.scala:67) at com.metamx.common.scala.Jackson$.newObjectMapper(Jackson.scala:10) at com.metamx.common.scala.Jackson$class.newObjectMapper(Jackson.scala:64) at com.metamx.common.scala.Jackson$.newObjectMapper(Jackson.scala:10) at com.metamx.common.scala.Jackson$class.$init$(Jackson.scala:14) at com.metamx.common.scala.Jackson$.(Jackson.scala:10) at com.metamx.common.scala.Jackson$.(Jackson.scala)

nbauernfeind commented 8 years ago

I suppose the error message would be more useful if it could tell you which version it found. Can you triple check that the version of jackson that you expect is being used and that you're not pulling in a different version via some other dependency?

sudhanshulenka commented 8 years ago

i provided explicitly 2.8.2 version for Jackson and scala-jackson but com.metamx.common packages is not using this jar may be. i am not able to find proper version syncronization for scala-jackson and faster Jackson.

cowtowncoder commented 8 years ago

@sudhanshulenka jackson-module-scala is synchronized with all other Jackson components wrt version numbers, although there have been occasional gaps (that is, version 2.8.0 is missing, for example, but 2.8.1 and 2.8.2 exist). Make sure you have explicit dependency for all components you directly depend on, and not just jackson-databind; transitive dependencies can easily result in incompatible set of dependencies.

sudhanshulenka commented 8 years ago

When try to run flink+druid = pom file =

[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1:compile [INFO] +- joda-time:joda-time:jar:2.9.4:compile [INFO] +- io.druid:tranquility-core_2.11:jar:0.8.2:compile [INFO] | +- org.scala-lang:scala-library:jar:2.11.7:compile [INFO] | +- com.metamx:scala-util_2.11:jar:1.11.6:compile [INFO] | | +- com.metamx:loglady_2.11:jar:1.1.0-mmx:compile [INFO] | | +- com.metamx:http-client:jar:1.0.3:compile [INFO] | | +- com.metamx:emitter:jar:0.3.3:compile [INFO] | | +- com.metamx:server-metrics:jar:0.2.6:compile [INFO] | | +- commons-lang:commons-lang:jar:2.6:compile [INFO] | | +- org.joda:joda-convert:jar:1.6:compile [INFO] | | +- org.scalaj:scalaj-time_2.11:jar:0.5:compile [INFO] | | +- org.yaml:snakeyaml:jar:1.11:compile [INFO] | | +- org.jdbi:jdbi:jar:2.27:compile [INFO] | | +- mysql:mysql-connector-java:jar:5.1.18:compile [INFO] | | +- com.h2database:h2:jar:1.3.158:compile [INFO] | | +- c3p0:c3p0:jar:0.9.1.2:compile [INFO] | | +- org.apache.zookeeper:zookeeper:jar:3.4.5:compile [INFO] | | | - jline:jline:jar:0.9.94:compile [INFO] | | | - junit:junit:jar:3.8.1:compile [INFO] | | +- org.apache.curator:curator-framework:jar:2.6.0:compile [INFO] | | | - org.apache.curator:curator-client:jar:2.6.0:compile [INFO] | | +- org.apache.curator:curator-recipes:jar:2.6.0:compile [INFO] | | - org.apache.curator:curator-x-discovery:jar:2.6.0:compile [INFO] | +- io.netty:netty:jar:3.10.5.Final:compile [INFO] | +- com.twitter:util-core_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:util-function_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:jsr166e:jar:1.0.0:compile [INFO] | | - org.scala-lang.modules:scala-parser-combinators_2.11:jar:1.0.4:compile [INFO] | +- com.twitter:finagle-core_2.11:jar:6.31.0:compile [INFO] | | +- com.twitter:util-app_2.11:jar:6.30.0:compile [INFO] | | | - com.twitter:util-registry_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:util-cache_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:util-codec_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:util-collection_2.11:jar:6.30.0:compile [INFO] | | | - commons-collections:commons-collections:jar:3.2.1:compile [INFO] | | +- com.twitter:util-hashing_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:util-jvm_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:util-lint_2.11:jar:6.30.0:compile [INFO] | | +- com.twitter:util-logging_2.11:jar:6.30.0:compile [INFO] | | - com.twitter:util-stats_2.11:jar:6.30.0:compile [INFO] | +- com.twitter:finagle-http_2.11:jar:6.31.0:compile [INFO] | +- org.slf4j:slf4j-api:jar:1.7.12:compile [INFO] | +- org.slf4j:jul-to-slf4j:jar:1.7.12:compile [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.3.3:compile [INFO] | | +- commons-logging:commons-logging:jar:1.1.3:compile [INFO] | | - commons-codec:commons-codec:jar:1.6:compile [INFO] | +- org.apache.httpcomponents:httpcore:jar:4.3.3:compile [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile [INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile [INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.4.6:compile [INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.6:compile [INFO] | +- io.druid:druid-server:jar:0.9.1:compile [INFO] | | +- io.druid:druid-processing:jar:0.9.1:compile [INFO] | | | +- io.druid:druid-common:jar:0.9.1:compile [INFO] | | | | +- io.druid:druid-api:jar:0.9.1:compile [INFO] | | | | | - io.airlift:airline:jar:0.7:compile [INFO] | | | | | - com.google.code.findbugs:annotations:jar:2.0.3:compile [INFO] | | | | +- org.apache.commons:commons-dbcp2:jar:2.0.1:compile [INFO] | | | | | - org.apache.commons:commons-pool2:jar:2.2:compile [INFO] | | | | +- commons-pool:commons-pool:jar:1.6:compile [INFO] | | | | +- org.hibernate:hibernate-validator:jar:5.1.3.Final:compile [INFO] | | | | | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile [INFO] | | | | | - com.fasterxml:classmate:jar:1.0.0:compile [INFO] | | | | +- javax.el:javax.el-api:jar:3.0.0:compile [INFO] | | | | +- com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.4.6:compile [INFO] | | | | +- org.apache.logging.log4j:log4j-jul:jar:2.5:compile [INFO] | | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.12:compile [INFO] | | | | +- net.java.dev.jets3t:jets3t:jar:0.9.4:compile [INFO] | | | | | +- javax.activation:activation:jar:1.1.1:compile [INFO] | | | | | +- org.bouncycastle:bcprov-jdk15on:jar:1.52:compile [INFO] | | | | | - com.jamesmurty.utils:java-xmlbuilder:jar:1.1:compile [INFO] | | | | | - net.iharder:base64:jar:2.3.8:compile [INFO] | | | | - org.antlr:antlr4-runtime:jar:4.5.1:compile [INFO] | | | +- com.metamx:bytebuffer-collections:jar:0.2.4:compile [INFO] | | | | +- com.metamx:extendedset:jar:1.3.9:compile [INFO] | | | | - org.roaringbitmap:RoaringBitmap:jar:0.5.16:compile [INFO] | | | +- com.ning:compress-lzf:jar:1.0.3:compile [INFO] | | | +- com.google.protobuf:protobuf-java:jar:2.5.0:compile [INFO] | | | +- commons-io:commons-io:jar:2.4:compile [INFO] | | | +- com.ibm.icu:icu4j:jar:4.8.1:compile [INFO] | | | - org.mapdb:mapdb:jar:1.0.8:compile [INFO] | | +- io.druid:druid-aws-common:jar:0.9.1:compile [INFO] | | | - com.amazonaws:aws-java-sdk:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-support:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-simpledb:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-simpleworkflow:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-storagegateway:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-route53:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-s3:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-importexport:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-sts:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-sqs:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-rds:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-redshift:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-elasticbeanstalk:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-glacier:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-iam:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-datapipeline:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-elasticloadbalancing:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-emr:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-elasticache:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-elastictranscoder:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-ec2:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-dynamodb:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-sns:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cloudtrail:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cloudwatch:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-logs:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cognitoidentity:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cognitosync:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-directconnect:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cloudformation:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cloudfront:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-kinesis:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-opsworks:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-ses:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-autoscaling:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cloudsearch:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cloudwatchmetrics:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-swf-libraries:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-codedeploy:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-codepipeline:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-kms:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-config:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-lambda:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-ecs:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-cloudhsm:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-ssm:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-workspaces:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-machinelearning:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-directory:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-efs:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-codecommit:jar:1.10.21:compile [INFO] | | | +- com.amazonaws:aws-java-sdk-devicefarm:jar:1.10.21:compile [INFO] | | | - com.amazonaws:aws-java-sdk-core:jar:1.10.21:compile [INFO] | | +- io.druid:druid-console:jar:0.0.3:compile [INFO] | | +- commons-cli:commons-cli:jar:1.2:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.glassfish:javax.el:jar:3.0.0:compile [INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.4.6:compile [INFO] | | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.4.6:compile [INFO] | | | - com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.4.6:compile [INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider:jar:2.4.6:compile [INFO] | | +- com.sun.jersey:jersey-server:jar:1.19:compile [INFO] | | +- com.sun.jersey:jersey-core:jar:1.19:compile [INFO] | | | - javax.ws.rs:jsr311-api:jar:1.1.1:compile [INFO] | | +- com.sun.jersey.contribs:jersey-guice:jar:1.19:compile [INFO] | | | - com.sun.jersey:jersey-servlet:jar:1.19:compile [INFO] | | +- org.eclipse.jetty:jetty-server:jar:9.2.5.v20141112:compile [INFO] | | | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile [INFO] | | | +- org.eclipse.jetty:jetty-http:jar:9.2.5.v20141112:compile [INFO] | | | - org.eclipse.jetty:jetty-io:jar:9.2.5.v20141112:compile [INFO] | | +- org.eclipse.jetty:jetty-proxy:jar:9.2.5.v20141112:compile [INFO] | | | +- org.eclipse.jetty:jetty-client:jar:9.2.5.v20141112:compile [INFO] | | | - org.eclipse.jetty:jetty-util:jar:9.2.5.v20141112:compile [INFO] | | +- com.google.code.findbugs:jsr305:jar:2.0.1:compile [INFO] | | +- io.tesla.aether:tesla-aether:jar:0.0.5:compile [INFO] | | | +- org.eclipse.aether:aether-spi:jar:0.9.0.M2:compile [INFO] | | | +- org.eclipse.aether:aether-util:jar:0.9.0.M2:compile [INFO] | | | +- org.eclipse.aether:aether-impl:jar:0.9.0.M2:compile [INFO] | | | +- org.eclipse.aether:aether-connector-file:jar:0.9.0.M2:compile [INFO] | | | +- io.tesla.aether:aether-connector-okhttp:jar:0.0.9:compile [INFO] | | | | +- com.squareup.okhttp:okhttp:jar:1.0.2:compile [INFO] | | | | - org.apache.maven.wagon:wagon-provider-api:jar:2.4:compile [INFO] | | | +- org.apache.maven:maven-aether-provider:jar:3.1.1:compile [INFO] | | | | +- org.apache.maven:maven-model:jar:3.1.1:compile [INFO] | | | | +- org.apache.maven:maven-model-builder:jar:3.1.1:compile [INFO] | | | | +- org.apache.maven:maven-repository-metadata:jar:3.1.1:compile [INFO] | | | | - org.codehaus.plexus:plexus-utils:jar:3.0.15:compile [INFO] | | | +- org.apache.maven:maven-settings-builder:jar:3.1.1:compile [INFO] | | | | - org.codehaus.plexus:plexus-interpolation:jar:1.19:compile [INFO] | | | - org.apache.maven:maven-settings:jar:3.1.1:compile [INFO] | | +- org.eclipse.aether:aether-api:jar:0.9.0.M2:compile [INFO] | | +- net.spy:spymemcached:jar:2.11.7:compile [INFO] | | +- net.jpountz.lz4:lz4:jar:1.3.0:compile [INFO] | | +- org.eclipse.jetty:jetty-servlet:jar:9.2.5.v20141112:compile [INFO] | | | - org.eclipse.jetty:jetty-security:jar:9.2.5.v20141112:compile [INFO] | | +- org.eclipse.jetty:jetty-servlets:jar:9.2.5.v20141112:compile [INFO] | | | - org.eclipse.jetty:jetty-continuation:jar:9.2.5.v20141112:compile [INFO] | | +- com.ircclouds.irc:irc-api:jar:1.0-0014:compile [INFO] | | +- com.maxmind.geoip2:geoip2:jar:0.4.0:compile [INFO] | | | +- com.maxmind.maxminddb:maxminddb:jar:0.2.0:compile [INFO] | | | - com.google.http-client:google-http-client-jackson2:jar:1.15.0-rc:compile [INFO] | | +- org.apache.derby:derby:jar:10.11.1.1:compile [INFO] | | +- org.apache.derby:derbynet:jar:10.11.1.1:compile [INFO] | | +- org.apache.derby:derbyclient:jar:10.11.1.1:compile [INFO] | | - org.apache.commons:commons-math3:jar:3.6.1:compile [INFO] | +- com.google.inject:guice:jar:4.0:compile [INFO] | | - aopalliance:aopalliance:jar:1.0:compile [INFO] | +- com.google.inject.extensions:guice-servlet:jar:4.0:compile [INFO] | +- com.google.inject.extensions:guice-multibindings:jar:4.0:compile [INFO] | - javax.validation:validation-api:jar:1.1.0.Final:compile [INFO] +- com.metamx:java-util:jar:0.27.10:compile [INFO] | +- org.skife.config:config-magic:jar:0.9:compile [INFO] | +- com.google.guava:guava:jar:16.0.1:compile [INFO] | +- net.sf.opencsv:opencsv:jar:2.3:compile [INFO] | +- org.mozilla:rhino:jar:1.7R5:compile [INFO] | - com.jayway.jsonpath:json-path:jar:2.1.0:compile [INFO] +- com.fasterxml.jackson.module:jackson-module-scala_2.11:jar:2.8.2:compile [INFO] | +- org.scala-lang:scala-reflect:jar:2.11.8:compile [INFO] | - com.fasterxml.jackson.module:jackson-module-paranamer:jar:2.8.2:compile [INFO] | - com.thoughtworks.paranamer:paranamer:jar:2.8:compile [INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.2:compile [INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.8.2:compile [INFO] - com.fasterxml.jackson.core:jackson-annotations:jar:2.8.2:compile

my used version

java.lang.ExceptionInInitializerError at com.metamx.tranquility.druid.DruidBeams$.(DruidBeams.scala:107) at com.metamx.tranquility.druid.DruidBeams$.(DruidBeams.scala) at com.metamx.tranquility.druid.DruidBeams.fromConfig(DruidBeams.scala) at com.bt.connection.DruidSessionBuilder.druidSessionBuilder(DruidSessionBuilder.java:46) at com.bt.connection.SessionFactory.druidSessionBuilder(SessionFactory.java:23) at com.bt.druid.DruidCrudOperationService.(DruidCrudOperationService.java:26) at com.bt.flink.consumer.KafkaFlinkConsumer.main(KafkaFlinkConsumer.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:509) at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403) at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:320) at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:777) at org.apache.flink.client.CliFrontend.run(CliFrontend.java:253) at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1005) at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1048) Caused by: com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.8.2 requires Jackson Databind version >= 2.8.0 and < 2.9.0 at com.fasterxml.jackson.module.scala.JacksonModule$class.setupModule(JacksonModule.scala:66) at com.fasterxml.jackson.module.scala.DefaultScalaModule.setupModule(DefaultScalaModule.scala:18) at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:730) at com.metamx.common.scala.Jackson$$anonfun$newObjectMapper$1.apply(Jackson.scala:70) at com.metamx.common.scala.Jackson$$anonfun$newObjectMapper$1.apply(Jackson.scala:68) at com.metamx.common.scala.Predef$EffectOps.withEffect(Predef.scala:44) at com.metamx.common.scala.Jackson$class.newObjectMapper(Jackson.scala:67) at com.metamx.common.scala.Jackson$.newObjectMapper(Jackson.scala:10) at com.metamx.common.scala.Jackson$class.newObjectMapper(Jackson.scala:64) at com.metamx.common.scala.Jackson$.newObjectMapper(Jackson.scala:10) at com.metamx.common.scala.Jackson$class.$init$(Jackson.scala:14) at com.metamx.common.scala.Jackson$.(Jackson.scala:10) at com.metamx.common.scala.Jackson$.(Jackson.scala)

nbauernfeind commented 8 years ago

There are a bunch of jackson 2.4.6 jars being included transitively; I think this is potentially causing your issue. I grepped for just jackson dependencies:

[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.4.6:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.6:compile
[INFO] | | | | +- com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.4.6:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.4.6:compile
[INFO] | | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.4.6:compile
[INFO] | | | - com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.4.6:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider:jar:2.4.6:compile
[INFO] +- com.fasterxml.jackson.module:jackson-module-scala_2.11:jar:2.8.2:compile
[INFO] | - com.fasterxml.jackson.module:jackson-module-paranamer:jar:2.8.2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.8.2:compile
[INFO] - com.fasterxml.jackson.core:jackson-annotations:jar:2.8.2:compile