Elastic Search java.lang.ArrayIndexOutOfBoundsException at ToXContent on initialization of client

Stack Trace:

Caused by: java.lang.ExceptionInInitializerError
        at com.fmrco.sai.sod.common.elasticsearch.config.ElasticConfig.client(ElasticConfig.java:33) ~[ElasticConfig.class:?]
.............    
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
        at org.elasticsearch.common.xcontent.ToXContent.<clinit>(ToXContent.java:45) ~[elasticsearch-5.5.2.jar:5.5.2]

I am using elasticsearch version 5.5.2

here is the jar I am importing

<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>5.5.2</version><!--$NO-MVN-MAN-VER$ -->
</dependency>

This runs perfectly fine locally but breaks when I attempt to deploy the war on our server. Any ideas? I am running java 8 and tomcat 8 locally and on my server.

It will help if you can provide the complete stacktrace of the exception and some code snippet of your client initialization.

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