Skip to content

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

Open
@NikolaiSchreier

Description

@NikolaiSchreier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-teamIssues pending triage by the Docs Teamtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions