Problem migrating my java code to Elasticsearch 2.4 (Java API)


(Andres Benavides) #1

I recently migrate to Elasticsearch 2.4 in my java code. I am using the following external libs in my gradle file:

       'spring-data-mongodb': 'org.springframework.data:spring-data-mongodb:1.6.0.RELEASE',
        'spring-data-rest': 'org.springframework.data:spring-data-rest-webmvc:2.2.0.RELEASE',
        'spring-webmvc': 'org.springframework:spring-webmvc:4.0.7.RELEASE',
        'elasticsearch-client': 'org.elasticsearch:elasticsearch:2.4.0',
        'spring-context': 'org.springframework:spring-context:4.0.7.RELEASE',
        'jackson': 'com.fasterxml.jackson.core:jackson-databind:2.8.1',
        'commons-io': 'commons-io:commons-io:2.4',
        'commons-codec': 'commons-codec:commons-codec:1.8',
        'commons-httpclient': 'org.apache.httpcomponents:httpclient:4.3.6',
        'commons-lang': 'org.apache.commons:commons-lang3:3.3.2',
        'commons-collections': 'org.apache.commons:commons-collections4:4.0',
        'commons-cli': 'commons-cli:commons-cli:1.3',
        'commons-csv': 'org.apache.commons:commons-csv:1.1',
        'joda-time': 'joda-time:joda-time:2.3',
        'spring-reactor': 'org.projectreactor.spring:reactor-spring-context:1.1.3.RELEASE',
        'json-smart': 'net.minidev:json-smart:1.3.1',
        'mongeez': 'org.mongeez:mongeez:0.9.3',
        'mongo-driver': 'org.mongodb:mongo-java-driver:2.12.3',
        'akka-actor': 'com.typesafe.akka:akka-actor_2.10:2.3.13',
        'scala-library': 'org.scala-lang:scala-library:2.10.4

I am using mockmvc to test my project. The error is occurring in MockMvc.java class and is the following:

Could not instantiate bean class [org.springframework.hateoas.hal.Jackson2HalModule$HalLinkListDeserializer]: Constructor threw exception

com.fasterxml.jackson.databind.deser.std.ContainerDeserializerBase: method (Ljava/lang/Class;)V not found

I think that this is is problem related to jackson dependencies but i am not sure.


(system) #2