# ES 5.3 and Java-API 5.3.0 \> java.lang.NullPointerException?

**URL:** <https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287>\
**Category:** Elasticsearch\
**Created:** [April 5, 2017, 9:46am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287 "2017-04-05T09:46:58Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpete](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mpete](https://discuss.elastic.co/u/mpete)\
**Post date:** [April 5, 2017, 9:46am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/1 "2017-04-05T09:46:58Z")

</div>

Hello together,

i'm using the Elasticsearch 5.3.0 and my little web service uses the according java-api 5.3.0 for the connection to the ES. Therfore i've added the new maven dependency for "org.elasticsearch.client". The web service runs as a war-file with all dependencies packed as jar-files in a WilfFly 10 environment.

With the ES 2.4.1 everything worked fine, but now after the technology upgrade i'm unable to deploy my war file cause of an null pointer exception in the builder.java class of the elastic search package:  
`Caused by: java.lang.ExceptionInInitializerError at org.elasticsearch.common.logging.DeprecationLogger.<clinit>(DeprecationLogger.java:138) at org.elasticsearch.common.xcontent.support.AbstractXContentParser.<init>(AbstractXContentParser.java:57) at org.elasticsearch.common.xcontent.json.JsonXContentParser.<init>(JsonXContentParser.java:44) at org.elasticsearch.common.xcontent.json.JsonXContent.createParser(JsonXContent.java:103) at org.elasticsearch.common.settings.Setting.parseableStringToList(Setting.java:832) at org.elasticsearch.common.settings.Setting.lambda$listSetting$27(Setting.java:786) at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:791) at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:786) at org.elasticsearch.common.network.NetworkService.<clinit>(NetworkService.java:50) at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:98) at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:126) at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:268) at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:125) at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:111) at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:101) at com.regiocom.bpo.rcease.util.TransportClientFactory.configureClients(TransportClientFactory.java:81) at com.regiocom.bpo.rcease.util.TransportClientFactory.init(TransportClientFactory.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_102] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_102] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_102] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_102] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) ... 47 more Caused by: java.lang.NullPointerException at org.elasticsearch.Build.<clinit>(Build.java:49) ... 71 more`

Has anybody an idea?

Thanks a lot,  
Marcus

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 5, 2017, 12:02pm UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/2 "2017-04-05T12:02:41Z")

</div>

This is a known issue, we will work on a fix soon, and add testing so that this can not happen again. See [https://github.com/elastic/elasticsearch/pull/21955](https://github.com/elastic/elasticsearch/pull/21955).

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 5, 2017, 12:02pm UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/3 "2017-04-05T12:02:55Z")

</div>

Also, I'm very sorry that you're running in to this.

---

<div class="post-metadata">

**Author:** ![mpete](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mpete](https://discuss.elastic.co/u/mpete)\
**Post date:** [April 5, 2017, 1:07pm UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/4 "2017-04-05T13:07:01Z")

</div>

Hello Jason,

thank you for the information and your really fast reply!  
Can you estimate when the issue will be fixed?

Best regards,  
Marcus

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 5, 2017, 1:30pm UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/5 "2017-04-05T13:30:17Z")

</div>

As a general policy, we do not provide dates. I think that we can get this fixed by 5.4.0, but I can not provide a date for when that will occur.

---

<div class="post-metadata">

**Author:** ![mpete](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mpete](https://discuss.elastic.co/u/mpete)\
**Post date:** [April 10, 2017, 8:26am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/6 "2017-04-10T08:26:20Z")

</div>

Hello Jason,

for me, it's enough to know whether it will be fixed in a bugfix version 5.3.1 or the next release. In the first case, i would wait until the next release. In the second one, i will use the ElasticSearch-Version 5.2.2.

Best regards,  
Marcus

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 10, 2017, 10:11am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/7 "2017-04-10T10:11:45Z")

</div>

I think that it's more likely that it will be fixed in the next minor release than in the next patch release, at least, that's what I'm planning on right now. I will update this thread if this changes.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 11, 2017, 6:40pm UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/8 "2017-04-11T18:40:54Z")

</div>

Have you repackaged the transport client jar? It looks here like the manifest is missing?

---

<div class="post-metadata">

**Author:** ![kumar\_ritesh\_ranjan](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@kumar\_ritesh\_ranjan](https://discuss.elastic.co/u/kumar_ritesh_ranjan)\
**Post date:** [April 12, 2017, 6:26am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/9 "2017-04-12T06:26:21Z")

</div>

Hi @jasontedor I did not understand when you say that manifest is missing? I am running Elasticsearch with apache storm and I am getting this error. Though If I run the Elasticsearch alone it works properly. Can you please explain it ?

Regards

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 12, 2017, 6:45am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/10 "2017-04-12T06:45:31Z")

</div>

A jar file can be (and often is) packaged with a manifest that contains meta information about the contents of the jar. We use this to read the build info of the jar and your stack trace shows a blow up trying to read this manifest. We are trying to understand the circumstances under which this can occur as we know of situations where the jar is intact yet the runtime environment hides the manifest (application containers with special classloaders might do this). We want to make sure the fix we have in mind covers everything without introducing leniency when Elasticsearch is running as a server.

---

<div class="post-metadata">

**Author:** ![kumar\_ritesh\_ranjan](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@kumar\_ritesh\_ranjan](https://discuss.elastic.co/u/kumar_ritesh_ranjan)\
**Post date:** [April 12, 2017, 7:26am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/11 "2017-04-12T07:26:52Z")

</div>

Hi, @jasontedor. Thanks for the explanation. I ran this command **unzip -p myjar.jar META-INF/MANIFEST.MF** and I can find **transport-5.3.0.jar** in it along with all other jars. So, it means transport client jar is not missing. Please, can you suggest what else I should look into to make it work ?

**EDIT**  
Also, **transport-5.3.0.jar** have manifest.mf present in it.

Regards

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 13, 2017, 10:57am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/12 "2017-04-13T10:57:55Z")

</div>

This will be fixed in Elasticsearch 5.3.1.

---

<div class="post-metadata">

**Author:** ![kumar\_ritesh\_ranjan](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@kumar\_ritesh\_ranjan](https://discuss.elastic.co/u/kumar_ritesh_ranjan)\
**Post date:** [April 13, 2017, 12:09pm UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/13 "2017-04-13T12:09:58Z")

</div>

Thanks @jasontedor. Will wait for the release.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 18, 2017, 2:50am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/14 "2017-04-18T02:50:34Z")

</div>

We added tests for this in [https://github.com/elastic/elasticsearch/pull/24147](https://github.com/elastic/elasticsearch/pull/24147) so hopefully we never break it again.

---

<div class="post-metadata">

**Author:** ![mpete](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mpete](https://discuss.elastic.co/u/mpete)\
**Post date:** [April 18, 2017, 8:08am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/15 "2017-04-18T08:08:49Z")

</div>

Hello Jason,

thank you for all the information and the really quick solution. 🙂  
We've now upgraded our cluster to version 5.2.2 and will switch to the next minor- or major-version.

Best regards,  
Marcus

---

<div class="post-metadata">

**Author:** ![bdgarman-ucd](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bdgarman-ucd](https://discuss.elastic.co/u/bdgarman-ucd)\
**Post date:** [May 12, 2017, 1:26am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/16 "2017-05-12T01:26:41Z")

</div>

Was having a similar issue with 5.4 when running within a Adobe Coldfusion 10 environment, though running from Eclipse was just fine. 5.2.2 and 5.2.3 seem to work in my environment though. I am also jumping back to 5.2.2 , for now.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [May 13, 2017, 1:58am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/17 "2017-05-13T01:58:20Z")

</div>

Please start a separate topic with the issue that you're seeing. What's reported here was fixed in 5.4.0.

---

<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:** [June 10, 2017, 2:04am UTC](https://discuss.elastic.co/t/es-5-3-and-java-api-5-3-0-java-lang-nullpointerexception/81287/18 "2017-06-10T02:04:30Z")

</div>

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