简体   繁体   English

JDK11 升级失败 - ClassNotFoundException jdk.internal.ref.Cleaner

[英]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.我已将我的 Java EE 应用程序从 JDK 8 升级到 JDK 11。但是当我部署到 JBOSS EAP 7.3 服务器时,出现以下异常。

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 .您的代码应使用java.lang.ref.Cleaner而不是jdk.internal.ref.Cleaner The latter was removed in Java 9:后者在 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.如果“内部” Cleaner class 的使用实际上来自第三方库代码,那么您需要将库升级到 Java 11 兼容版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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