Java.lang.ClassNotFoundException: sun.misc.Cleaner

When using Undertow 1.4.20 (as a built-in Servlet mechanism), I get this exception when running our application under Java 9. =: java.lang.ClassNotFoundException: sun.misc.Cleaner

The reason for this line in io.undertow.server.DirectByteBufferDeallocator :

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

This class really no longer exists in Java 9. But a replacement is available: java.lang.ref.Cleaner

Can I ignore this exception? Is there a timeline for fixing this (i.e., creating Java 9 compatibility)?

+5
source share
1 answer

This is really a bug resolved in 2.0.0.Alpha2 and 1.4.21.Final.

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

+2
source

Source: https://habr.com/ru/post/1272204/


All Articles