Java regression and Undertow

In the most recent updates of Java 8 u333 and 11.0.15, there was a regression introduced that affects the XNIO libraries that power Undertow, which CommandBox uses. This issue appears to only affect Windows. If you are getting any of the error messages here, the TL; DR; is simply to update to CommandBox 5.5.1, where we have a workaround already in place.

The original java regression is ticketed here:
Which broke XNIO as ticketed here: [XNIO-404] Channels cannot open file "NUL:" on Windows - Red Hat Issue Tracker
Which broke Undertow as ticketed here: [UNDERTOW-2073] JDK 8 / 11 updates breaking Undertow - Red Hat Issue Tracker

The affected Java versions are 8u333 and 11.0.15. If you are hitting this bug, you’ll see one or more of these errors in your console and your browser will likely display a connection failure.

java.lang.NoClassDefFoundError: Could not initialize class org.xnio.channels.Channels
java.lang.NoClassDefFoundError: Could not initialize class org.xnio.conduits.Conduits The specific sequence of files included or processed is: ... Invalid file path
        at org.xnio.channels.Channels$
        at org.xnio.channels.Channels$

If you’re not in a position to upgrade CommandBox, you can manually set your Java version to a previous update. Ex:

server set jvm.javaVersion=openjdk8_jdk8u312-b07

Or you can continue with the latest version of java and add this JVM arg:

server set jvm.args=""

However, none of that is necessary if you can just update to CommandBox 5.5 where we’re adding that JVM for you by default until Undertow releases their fix.


Thank you very much! Java 8.332 is also affected :slight_smile:

1 Like

Hi Brad,
From what I understand, the breaking change was in Java 8 u331 and Java 11.0.15, and the change was corrected in Java 8 u333 and Java, respectively.

Yes, but again-- this is already fixed on the latest stable version of CommandBox. Just keep updated and you’ll not have to worry about it!

Ah, OK. Thanks, Brad.

Thanks a lot. The jdks i’m using happen to be affected.

Thank you very much!
In Wildfly 20 and openjdk 11.0.15 is affected