java.lang.ClassNotFoundException: sun.misc.Cleaner

匆匆过客 提交于 2019-12-07 06:36:31

问题


When using Undertow 1.4.20 (as embedded Servlet engine), i get this exception when running our app under Java 9.=: java.lang.ClassNotFoundException: sun.misc.Cleaner

Cause is this line in io.undertow.server.DirectByteBufferDeallocator:

tmpCleanerClean = Class.forName("sun.misc.Cleaner").getMethod("clean");

This class does indeed not exists anymore in Java 9. But a replacement is available: java.lang.ref.Cleaner

Can i ignore this exception for now? Is there a timeline for fixing this (i.e. making undertow Java 9 compatible)?


回答1:


This was indeed a bug, resolved in 2.0.0.Alpha2 and 1.4.21.Final.

See https://issues.jboss.org/browse/UNDERTOW-1187



来源:https://stackoverflow.com/questions/46476085/java-lang-classnotfoundexception-sun-misc-cleaner

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!