How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java

Veröffentlicht am: 13 Februar 2020
auf dem Kanal: java tmz
4,195
16

Hello in this video we will show you How to resolve No Class Def Found Error : javax xml bind JAXBException in Java 11 or java 12

I have some code that uses JAXB API classes which have been provided as a part of the JDK in Java 6 7 8. When I run the same code with Java 12, at runtime I get errors indicating that JAXB classes can not be found

so why can Java 11 no longer find these classes?

-

The JAXB APIs are considered to be Java EE APIs and therefore are no longer contained on the default classpath in Java SE 9. In Java 11, they are complete removed from the JDK.

Fortunately, these Java EE APIs that were provided in JDK 6/7/8 are still in the JDK, but they just aren't on the classpath by default.

So! wath is the Proper long-term solution:


What you will need to do in Java 11 and forward is include your own copy of the Java EE APIs on the classpath or module path. For example, you can add the JAX-B APIs as a Maven dependency


Auf dieser Seite können Sie das Online-Video How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer java tmz 13 Februar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 4,195 Mal angesehen und es wurde von 16 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!