# Is any Java client V7 working with ES V8?

**URL:** <https://discuss.elastic.co/t/is-any-java-client-v7-working-with-es-v8/316325>\
**Category:** Elasticsearch\
**Created:** [October 11, 2022, 12:13pm UTC](https://discuss.elastic.co/t/is-any-java-client-v7-working-with-es-v8/316325 "2022-10-11T12:13:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo\_Montes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eduardo_montes/32/100049_2.png) [@Eduardo\_Montes](https://discuss.elastic.co/u/Eduardo_Montes)\
**Post date:** [October 11, 2022, 12:13pm UTC](https://discuss.elastic.co/t/is-any-java-client-v7-working-with-es-v8/316325/1 "2022-10-11T12:13:03Z")

</div>

Hello,  
I'm trying to make upgrade from ES V6 to V8. Unfortunately I have to use Java 8 only (on client side). I found out that compatible (it means supported) Java 8 client (TransportClient) for ES V8 is also V7.17.6.  
I wrote simple client with index existence check:

```auto
public static void main(String[] args) throws IOException {
    Settings settings = Settings.builder()
                    .put("cluster.name", "elasticsearch")
                    .put("client.transport.sniff", true)
                    .build();

    TransportClient client = new PreBuiltTransportClient(settings);
    client.addTransportAddress(new TransportAddress(InetAddress.getByName(localhost), 9300));

    AliasesExistResponse response = client.admin().indices().prepareAliasesExist("test_alias").get();
    boolean indexExists = response.exists();
        

```

However when I run this code I got this exception:

```auto
Exception in thread "main" ActionNotFoundTransportException[No handler for action [indices:admin/aliases/exists]]
	at org.elasticsearch.transport.InboundAggregator.lambda$new$0(InboundAggregator.java:47)
	at org.elasticsearch.transport.InboundAggregator.initializeRequestState(InboundAggregator.java:197)
	at org.elasticsearch.transport.InboundAggregator.headerReceived(InboundAggregator.java:66)
	at org.elasticsearch.transport.InboundPipeline.forwardFragments(InboundPipeline.java:138)
	at org.elasticsearch.transport.InboundPipeline.doHandleBytes(InboundPipeline.java:121)
	at org.elasticsearch.transport.InboundPipeline.handleBytes(InboundPipeline.java:86)
	at org.elasticsearch.transport.netty4.Netty4MessageInboundHandler.channelRead(Netty4MessageInboundHandler.java:63)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:280)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:623)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:586)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.lang.Thread.run(Thread.java:833)

```

I read that deprecated TransportClient V7.17.X is not fully compatible with ES 8 and this is reason of given exception. Is any solution for Java client using Java 8 and working with ES V8? E.g. new Java Client type...

---

<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:** [October 11, 2022, 2:12pm UTC](https://discuss.elastic.co/t/is-any-java-client-v7-working-with-es-v8/316325/2 "2022-10-11T14:12:31Z")

</div>

The new Java Client is Java8 compatible. You should use this one.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Montes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eduardo_montes/32/100049_2.png) [@Eduardo\_Montes](https://discuss.elastic.co/u/Eduardo_Montes)\
**Post date:** [October 12, 2022, 6:38am UTC](https://discuss.elastic.co/t/is-any-java-client-v7-working-with-es-v8/316325/3 "2022-10-12T06:38:15Z")

</div>

Do you mean [High Level Rest Client version 7.17](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.17/java-rest-high.html) or [Elasticsearch Java API Client 8.4](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html)?

---

<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:** [October 12, 2022, 6:56am UTC](https://discuss.elastic.co/t/is-any-java-client-v7-working-with-es-v8/316325/4 "2022-10-12T06:56:26Z")

</div>

I mean the later. It is designed for Elastic 8 and comes with less dependencies.

---

<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:** [November 9, 2022, 6:57am UTC](https://discuss.elastic.co/t/is-any-java-client-v7-working-with-es-v8/316325/5 "2022-11-09T06:57:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
