meilisearch / meilisearch/meilisearch-java
NoClassDefFoundError: okhttp3/MediaType, after upgrading to 0.18.0
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 245
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
From 0.17.1 onwards the okhttp version was changed to 5.x again and the same issue NoClassDefFoundError came up again, so I had to manually exclude okhttp and import the 4.x version of okhttp.
Or change version to 0.17.0<dependency> <groupId>com.meilisearch.sdk</groupId> <artifactId>meilisearch-java</artifactId> <version>0.18.0</version> <exclusions> <exclusion> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>4.12.0</version> </dependency>
Originally posted by @zhuyisuzhi in #893
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the NoClassDefFoundError with com.meilisearch.sdk:meilisearch-java:0.18.0 and inspect its resolved okhttp dependency, comparing it with 0.17.0 and the reported okhttp 4.12.0 workaround. Done means a normal 0.18.0 dependency can run without manually excluding okhttp or adding a replacement version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100