CDI injected/managed TransportClient fails in ElasticSearch 5.3

(Etay2000) #1

Is using CDI to inject and manage the creation of TransportClient instances supported in 5.3? In 5.2.2 I was able to use a CDI producer method to @Inject a PreBuiltTransportClient instance with no issues. As of 5.3 this blows up with:

Caused by: java.lang.ExceptionInInitializerError
at org.elasticsearch.common.logging.DeprecationLogger.(
at org.elasticsearch.common.xcontent.json.JsonXContentParser.(
at org.elasticsearch.common.xcontent.json.JsonXContent.createParser(
at org.elasticsearch.common.settings.Setting.parseableStringToList(
at org.elasticsearch.common.settings.Setting.lambda$listSetting$27(
at org.elasticsearch.common.settings.Setting$$Lambda$168/105203394.apply(Unknown Source)
at org.elasticsearch.common.settings.Setting.listSetting(
at org.elasticsearch.common.settings.Setting.listSetting(
at org.elasticsearch.client.transport.TransportClient.newPluginService(
at org.elasticsearch.client.transport.TransportClient.buildTemplate(
at org.elasticsearch.client.transport.TransportClient.(
at org.elasticsearch.transport.client.PreBuiltTransportClient.(
at org.elasticsearch.transport.client.PreBuiltTransportClient.(
at org.elasticsearch.transport.client.PreBuiltTransportClient.(
Caused by: java.lang.NullPointerException
at org.elasticsearch.Build.(
... 99 more

(Jason Tedor) #2

This is a known issue: ES 5.3 and Java-API 5.3.0 > java.lang.NullPointerException?

(Jason Tedor) #3

Also, as I said on the other issue, and I'll say the same to you: I'm really sorry that you ran into this issue.

(Etay2000) #4

No worries, and thanks for the quick response.

(Jason Tedor) #5

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

(Etay2000) #6

No I didn't do any repackaging of any JARs I simply upgraded from 5.2.2 to 5.3.0 via Maven. I just double checked and the manifest file is present in the 5.3.0 JAR.

(Jason Tedor) #7

Okay, so I think is indeed a case of how Wildfly handles class loading. Thanks for confirming.

(Jason Tedor) #8

This will be fixed in Elasticsearch 5.3.1.

(Etay2000) #9

Nice! Thanks

(Jason Tedor) #10

We added tests for this in so hopefully we never break it again.

(system) #11

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