0

I was compiling a project module and it failed, part of the error stack is shown below:

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass 
(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass 
(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)

My best guess is that this third-party dependency

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-classworlds</artifactId>
      <type>jar</type>
      <version>2.6.0</version>
   </dependency> 

which works under JDK 8, failed to work due to that JAXB APIs were striped off from JDK11. I'll try upgrading this dependency to see if it makes a difference.

However, can anyone comment on my reasoning or suggest a solution?

J.E.Y
  • 1,173
  • 2
  • 15
  • 37

0 Answers0