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
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.
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.
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 ?
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.
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.
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.
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.