Skip to content

MissingRequiredPropertyException: Missing required property 'ErrorCause.reason' #339

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

Closed
afimuc opened this issue Jul 8, 2022 · 2 comments · Fixed by #384
Closed

MissingRequiredPropertyException: Missing required property 'ErrorCause.reason' #339

afimuc opened this issue Jul 8, 2022 · 2 comments · Fixed by #384
Labels
Area: Specification Related to the API spec used to generate client code

Comments

@afimuc
Copy link

afimuc commented Jul 8, 2022

Java API client version

7.17.3

Java version

13

Elasticsearch Version

7.17.5

Problem description

Sending requests using co.elastic.clients.elasticsearch.ElasticsearchAsyncClient#bulk(co.elastic.clients.elasticsearch.core.BulkRequest)

An error during the processing of the request leads to

Error deserializing co.elastic.clients.elasticsearch._types.ErrorCause: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'ErrorCause.reason' (JSON path: items[1].error.caused_by.caused_by.caused_by) (line no=1, column no=953, offset=-1)
at co.elastic.clients.json.JsonpMappingException.from0(JsonpMappingException.java:134) ~[elasticsearch-java-7.17.3.jar:na]
...
Caused by: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'ErrorCause.reason'
	at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.elasticsearch._types.ErrorCause.<init>(ErrorCause.java:81) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.elasticsearch._types.ErrorCause.<init>(ErrorCause.java:56) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.elasticsearch._types.ErrorCause$Builder.build(ErrorCause.java:375) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.elasticsearch._types.ErrorCause$Builder.build(ErrorCause.java:216) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:80) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:71) ~[elasticsearch-java-7.17.3.jar:na]
	at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:180) ~[elasticsearch-java-7.17.3.jar:na]
	... 52 common frames omitted
@xiaohuan666
Copy link

@swallez hello,I had the same problem,what should i do? Upgrade es version? or Upgrade java client version? which version should i upgrade

@swallez
Copy link
Member

swallez commented Sep 15, 2022

@xiaohuan666 the fix will be part of versions 8.4.2 that will be released in the next 2 weeks and 7.17.7 that should be released in october.

In the meantime, if your environment permits, you can also use a snapshot release for these versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Specification Related to the API spec used to generate client code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants