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

**URL:** <https://discuss.elastic.co/t/problem-migrating-my-java-code-to-elasticsearch-2-4-java-api/62749>\
**Category:** Elasticsearch\
**Created:** [October 11, 2016, 7:07pm UTC](https://discuss.elastic.co/t/problem-migrating-my-java-code-to-elasticsearch-2-4-java-api/62749 "2016-10-11T19:07:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres\_Benavides](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres_benavides/32/12415_2.png) [@Andres\_Benavides](https://discuss.elastic.co/u/Andres_Benavides)\
**Post date:** [October 11, 2016, 7:07pm UTC](https://discuss.elastic.co/t/problem-migrating-my-java-code-to-elasticsearch-2-4-java-api/62749/1 "2016-10-11T19:07:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:13pm UTC](https://discuss.elastic.co/t/problem-migrating-my-java-code-to-elasticsearch-2-4-java-api/62749/2 "2017-07-05T22:13:17Z")

</div>


