elastic / elastic/elasticsearch-java

java.lang.IllegalArgumentException: Class class co.elastic.clients.elasticsearch.core.bulk.UpdateOperation cannot be read from JSON

Open
#477 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
524
Forks
300
Avg merge
1d 11h
Merged PRs (30d)
16

Description

### Java API client version

8.5.3 and 8.4.1

### Java version

jdk11

### Elasticsearch Version

8.4.1

### Problem description

java.lang.IllegalArgumentException: Class class co.elastic.clients.elasticsearch.core.bulk.UpdateOperation cannot be read from JSON

```
StringReader reader = new StringReader(json);
BulkOperation updateOp = new BulkOperation.Builder()
.update(new UpdateOperation.Builder<>()
.index(topic)
.id("1")
.withJson(reader)
.retryOnConflict(Math.min(1, 5))
.build())
.build();
```
![image](https://user-images.githubusercontent.com/13815910/210573484-645a62d4-2066-40eb-aecf-b89d0ca360f0.png)
![image](https://user-images.githubusercontent.com/13815910/210573728-0abf4808-ae34-436a-9fc1-9da1a8b5c869.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.