IDEA error: javax/xml/bind/DatatypeConverter [How to Solve]

Error in idea javax/XML/bind/datatypeconverter

java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

Solution:

Import required  javax.xml.bind.jar     Just download an import

The real solution: java.lang.noclassdeffounderror: javax/XML/bind/datatypeconverter

 

This error occurred when using hibernate in the JDK 12.0 environment today. The error log is as follows:
! [] ()
cause of failure:

JAXB API is the API of Java EE, so this jar package is no longer included in Java se 9.0
the concept of module is introduced in Java 9. By default, the jar package of Java EE will no longer be included in Java se
but this API is bundled in Java 6/7/8

solution 1:

Reduce JDK version to JDK 8

solution 2: (pro test feasible)

Manually add these dependent jar packages

<dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-core</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>javax.activation</groupId>
        <artifactId>activation</artifactId>
        <version>1.1.1</version>
    </dependency>

Similar Posts: