Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException in toString() #424

Closed
fs-chris opened this issue Oct 19, 2022 · 1 comment · Fixed by #440
Closed

IllegalArgumentException in toString() #424

fs-chris opened this issue Oct 19, 2022 · 1 comment · Fixed by #440
Labels
Category: Bug Something isn't working

Comments

@fs-chris
Copy link

Java API client version

8.4.3

Java version

17

Elasticsearch Version

8.4.3

Problem description

Using the toString() method for requests containing JsonData leads to the below exception.
The shown exception happens on an IndexSettings object when logging it before sending.

 java.lang.IllegalArgumentException: Jackson's ObjectMapper can only be used with the JacksonJsonpProvider
 	at App.war//co.elastic.clients.json.jackson.JacksonJsonpMapper.serialize(JacksonJsonpMapper.java:87)
 	at App.war//co.elastic.clients.json.JsonDataImpl.serialize(JsonDataImpl.java:101)
 	at App.war//co.elastic.clients.elasticsearch.indices.IndexSettings.serializeInternal(IndexSettings.java:796)
 	at App.war//co.elastic.clients.elasticsearch.indices.IndexSettings.serialize(IndexSettings.java:788)
 	at App.war//co.elastic.clients.json.JsonpUtils.toString(JsonpUtils.java:324)
 	at App.war//co.elastic.clients.json.JsonpUtils.toString(JsonpUtils.java:261)
 	at App.war//co.elastic.clients.elasticsearch.indices.IndexSettings.toString(IndexSettings.java:1093)
@swallez
Copy link
Member

swallez commented Nov 7, 2022

Thanks for the report. This has been fixed in #440 and backported to the 8.5 and 7.17 branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants