Skip to content

NoClassDefFoundError: okhttp3/MediaType, after upgrading to 0.18.0 #923

Description

@zhuyisuzhi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions