Migration Jave 11 _ How to resolve : java.lang.ClassNotFoundException: javax.activation.MimeTypeParseException
Asked Answered
N

1

6

I'm migrating my java project from 8 to 11 version.

As javax.activation has been removed from JDK 11, so I added it to Maven pom.xml file :

<dependency>
  <groupId>javax.activation</groupId>
  <artifactId>activation</artifactId>
  <version>1.1.1</version>
</dependency>

The dependency is listed in "Externat librairies" but every time I run "mvn clean install" to build my project, I get this error :

...
Caused by: java.lang.ClassNotFoundException: javax.activation.MimeTypeParseException
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)
... 51 more

Have you any idea please ? Thanks

Nourish answered 31/1, 2019 at 13:36 Comment(1)
Java 11 is not supported yet. Please file an issue.Leventis
P
0

Sadly @lexicore is no more here to answer but the maven-jaxb2-plugin (which was renamed jaxb-tools since get merged with other related jaxb-projects) is still (and back) under active development and is now supporting jdk11 as well as jdk17 and even jdk21.

Support of jaxb-jakarta is also OK (jaxb3 and jaxb4)

You can check the migration guide to get the latest versions available based on targeted jaxb version.

Pullet answered 1/3, 2024 at 22:31 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.