# Upgrade elasticsearch.jar from 1.7.5 to 2.3.5

**URL:** <https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528>\
**Category:** Elasticsearch\
**Created:** [September 1, 2016, 10:01am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528 "2016-09-01T10:01:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahesh.maney](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mahesh.maney](https://discuss.elastic.co/u/mahesh.maney)\
**Post date:** [September 1, 2016, 10:01am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528/1 "2016-09-01T10:01:39Z")

</div>

Hi,

I have upgraded the client(elasticsearch.jar) from 1.7.5 to 2.3.5  
One of the major changes was "org.elasticsearch.client.transport.TransportClient". In 1.7.5 version org.elasticsearch.client.transport.TransportClient had public constructor with no arg constructor.  
In my applicationContext-search.xml, earlier we had  
\</\>bean id="transportClient" class="org.elasticsearch.client.transport.TransportClient"/\>  
which was replaced to  
"bean id="transportClient" class="org.elasticsearch.client.transport.TransportClient" factory-method="builder"\>  
/bean\>  
bean id="transportClient1" factory-bean="transportClient" factory-method="build" \>  
/bean\>"

Now when i start my service that invokes elastic search i end up in the following error  
[01 Sep 2016 15:14:27,390] WARN [] [elasticsearch[Carolyn Trainer][transport\_client\_worker][T#1]{New I/O worker #1}] [org.elasticsearch.transport.netty.NettyTransport] [Carolyn Trainer] exception caught on transport layer [[id: 0xfaea1184, /127.0.0.1:63786 =\> localhost/127.0.0.1:9300]], closing connection  
java.lang.NullPointerException  
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:207)  
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:202)  
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:136)  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)  
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)  
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)  
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)  
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:745)

Elastic search set up is one node in the development environment.  
Can someone help me whats happening here ?

Regards,  
Maney

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 1, 2016, 11:20am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528/2 "2016-09-01T11:20:26Z")

</div>

Please format your code using `</>` icon. It will make your post more readable.

Are you trying to communicate with a node running another version than 2.3 with this code?

---

<div class="post-metadata">

**Author:** ![mahesh.maney](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mahesh.maney](https://discuss.elastic.co/u/mahesh.maney)\
**Post date:** [September 1, 2016, 12:05pm UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528/3 "2016-09-01T12:05:30Z")

</div>

Hi,

I'm a first timer here and will take care of tags in future.  
Yes, the server is running on 1.3.2 and i'm using the client i.e, elasticsearch-2.3.5.jar.

Regards,  
Maney

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 1, 2016, 12:59pm UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528/4 "2016-09-01T12:59:53Z")

</div>

You can't mix major versions like this.

---

<div class="post-metadata">

**Author:** ![mahesh.maney](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mahesh.maney](https://discuss.elastic.co/u/mahesh.maney)\
**Post date:** [September 6, 2016, 7:11am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528/5 "2016-09-06T07:11:52Z")

</div>

Hello dadoonet,  
My wrong. Your suggestion solved my issue.  
I was running the client (elasticsearch.jar) on 2.3.5 and the server on 1.3.2.  
Now i have upgraded server to 2.3.5 and things are up n working. Appreciate your help 🙂

Regards,  
Maney

---

<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:22pm UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-jar-from-1-7-5-to-2-3-5/59528/6 "2017-07-05T22:22:23Z")

</div>


