简体   繁体   中英

JDK11 Upgrade Fails - ClassNotFoundException jdk.internal.ref.Cleaner

I have upgraded my Java EE application to JDK 11 from JDK 8. But when I'm deploying into the JBOSS EAP 7.3 server I get the following exception.

Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: jdk.internal.ref.Cleaner from [Module "deployment.DFNNTPOMS_X_X_3.003.000.00.0.ear" from Service Module Loader]
    at deployment.DFNNTPOMS_X_X_3.003.000.00.0.ear//net.openhft.chronicle.hash.impl.util.CleanerUtils.<clinit>(CleanerUtils.java:42)
    ... 63 more
Caused by: java.lang.ClassNotFoundException: jdk.internal.ref.Cleaner from [Module "deployment.DFNNTPOMS_X_X_3.003.000.00.0.ear" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:315)
    at deployment.DFNNTPOMS_X_X_3.003.000.00.0.ear//net.openhft.chronicle.hash.impl.util.CleanerUtils.<clinit>(CleanerUtils.java:35)
    ... 63 more

Any solution?

Your code should use java.lang.ref.Cleaner instead of jdk.internal.ref.Cleaner . The latter was removed in Java 9:

If the usage of the "internal" Cleaner class is actually coming from 3rd-party library code, then you need to upgrade the library to a Java 11 compatible version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM