Skip to content

[Issue]: Explicit jakarta.json-api dependency does not "solve the problem" #1319

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

Open
NikolaiSchreier opened this issue Apr 30, 2025 · 0 comments
Labels
needs-team Issues pending triage by the Docs Team triage

Comments

@NikolaiSchreier
Copy link

Type of issue

None

What documentation page is affected

https://www.elastic.co/docs/reference/elasticsearch/clients/java/setup/installation

What happened?

The paragraph about solving ClassNotFoundException: jakarta.json.spi.JsonProvider recommends adding an explicit dependency to the version that the elasticsearch clients expects. This does not "solve" the problem, it just pushes it somewhere else.

Additional info

If there is a dependency conflict, chances are, another dependency requires and uses the jakarta.json-api in the old version with classes in the javax packages. So it will will fail with a ClassNotFoundException on their part. This is why we call this dependency hell - there's no easy solution for it.
The workaround is usually a repackaging of the library under a different name, so you can have both dependencies included.

@github-actions github-actions bot added the needs-team Issues pending triage by the Docs Team label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-team Issues pending triage by the Docs Team triage
Projects
None yet
Development

No branches or pull requests

1 participant