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:
- Hibernate Exception: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
- [Solved] Java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
- [Solved] Java.lang.ClassNotFoundException: javax.xml.bind.JAXBException (i)
- [Solved] Eclipse Run Java Error: NoClassDefFoundError: javax/xml/bind/*
- [Solved] Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses
- [Solved] Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses
- [Solved] java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUni
- [Solved] Interpreter error /com.fasterxml.jackson.databind.JavaType
- [Solved] SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
- [Solved] Spring Boot Error: Failed to instantiate SLF4J LoggerFactory Reported exception: