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

Sever 2018. 4. 25. 00:02
반응형
Proper long-term solution:
The Java EE API modules listed above are all marked @Deprecated(forRemoval=true), so they will probably be removed in Java 11. So the --add-module approach will no longer work in Java 11 out of the box.
What you will need to do in Java 11 and forward is include your own copy of the Java EE APIs on the class path or module path. For example, you can add the JAX-B APIs as a maven dependency like this:
<!-- Java 6 = JAX-B Version 2.0 -->
<!-- Java 7 = JAX-B Version 2.2.3 -->
<!-- Java 8 = JAX-B Version 2.2.8 -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>


반응형
: