Search code examples
jakarta-eeclassnotfoundexceptionnoclassdeffounderrorjsonbquarkus

ClassNotFoundException / NoClassDefFoundError for jakarta.json.bind types in quarkus


I have a maven module that depends on / uses types from jakarta.json.bind. However these types can not be resolved out of the box in latest quarkus (1.13.0.Final). Is there a recommended way to make using types from jakarta.json.bind possible in quarkus?

Adding a dependency to jakarta.json.bind-api does not help and seems to cause other problems:

        <dependency>
            <groupId>jakarta.json.bind</groupId>
            <artifactId>jakarta.json.bind-api</artifactId>
            <version>2.0.0</version>
        </dependency>

Thanks for any ideas.


Solution

  • Quarkus doesn't use the jakarta packages currently.

    To use JSON-B in Quarkus you should use

    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-jsonb</artifactId>
        <version>1.13.0.Final</version>
    </dependency>