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

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

Open
lucky-xin opened this issue Jan 4, 2023 · 1 comment

Comments

@lucky-xin
Copy link

lucky-xin commented Jan 4, 2023

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
image

@yash-meesho
Copy link

@lucky-xin did you find a solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants