Buggy code:
public class ManagementHttpServer { private final HttpOpenListener openListener ; private final InetSocketAddress httpAddress ; private final InetSocketAddress secureAddress ; private volatile XnioWorker worker ; private volatile AcceptingChannel < StreamConnection > normalServer ; private volatile AcceptingChannel < SslConnection > secureServer ; private final SecurityRealm securityRealm ; private ManagementHttpServer ( HttpOpenListener openListener , InetSocketAddress httpAddress , InetSocketAddress secureAddress , SecurityRealm securityRealm ) { } public void start ( ) { } public void stop ( ) { } public static ManagementHttpServer create ( InetSocketAddress bindAddress , InetSocketAddress secureBindAddress , int backlog , ModelController modelController , SecurityRealm securityRealm , ControlledProcessStateService controlledProcessStateService , ConsoleMode consoleMode , String consoleSlot , final ChannelUpgradeHandler upgradeHandler ) throws IOException { } private static void setupOpenListener ( HttpOpenListener listener , ModelController modelController , ConsoleMode consoleMode , String consoleSlot , ControlledProcessStateService controlledProcessStateService , int securePort , SecurityRealm securityRealm , final ChannelUpgradeHandler upgradeHandler ) { CanonicalPathHandler canonicalPathHandler = new CanonicalPathHandler ( ) ; listener . setRootHandler ( canonicalPathHandler ) ; PathHandler pathHandler = new PathHandler ( ) ; HttpHandler current = pathHandler ; if ( upgradeHandler != null ) { upgradeHandler . setNonUpgradeHandler ( current ) ; current = upgradeHandler ; } if ( securePort > 0 ) { current = new io . undertow . security . handlers . SinglePortConfidentialityHandler ( current , securePort ) ; } current = new io . undertow . server . handlers . cache . CacheHandler ( new io . undertow . server . handlers . cache . DirectBufferCache ( 1024 , ( 1024 * 10 ) , ( 1024 * 1000 ) , BufferAllocator . BYTE_BUFFER_ALLOCATOR ) , current ) ; current = new io . undertow . server . handlers . error . SimpleErrorPageHandler ( current ) ; canonicalPathHandler . setNext ( current ) ; ResourceHandlerDefinition consoleHandler = null ; try { consoleHandler = consoleMode . createConsoleHandler ( consoleSlot ) ; } catch ( ModuleLoadException e ) { HttpServerLogger . ROOT_LOGGER . consoleModuleNotFound ( ( consoleSlot == null ? "main" : consoleSlot ) ) ; } try { pathHandler . addPrefixPath ( ERROR_CONTEXT , ErrorContextHandler . createErrorContext ( consoleSlot ) ) ; } catch ( ModuleLoadException e ) { <START_BUG> HttpServerLogger . ROOT_LOGGER . error ( ( consoleSlot == null ? "main" : consoleSlot ) ) ; <END_BUG> } ManagementRootConsoleRedirectHandler rootConsoleRedirectHandler = new ManagementRootConsoleRedirectHandler ( consoleHandler ) ; DomainApiCheckHandler domainApiHandler = new DomainApiCheckHandler ( modelController , controlledProcessStateService ) ; pathHandler . addPrefixPath ( "//" , rootConsoleRedirectHandler ) ; if ( consoleHandler != null ) { HttpHandler readinessHandler = new org . jboss . as . domain . http . server . security . RedirectReadinessHandler ( securityRealm , consoleHandler . getHandler ( ) , ErrorContextHandler . ERROR_CONTEXT ) ; pathHandler . addPrefixPath ( consoleHandler . getContext ( ) , readinessHandler ) ; } HttpHandler readinessHandler = new org . jboss . as . domain . http . server . security . DmrFailureReadinessHandler ( securityRealm , ManagementHttpServer . secureDomainAccess ( domainApiHandler , securityRealm ) , ErrorContextHandler . ERROR_CONTEXT ) ; pathHandler . addPrefixPath ( PATH , readinessHandler ) ; pathHandler . addExactPath ( "management-upload" , readinessHandler ) ; if ( securityRealm != null ) { pathHandler . addPrefixPath ( LogoutHandler . PATH , new org . jboss . as . domain . http . server . security . LogoutHandler ( securityRealm . getName ( ) ) ) ; } } private static HttpHandler secureDomainAccess ( final HttpHandler domainHandler , final SecurityRealm securityRealm ) { } private static AuthenticationMechanism wrap ( final AuthenticationMechanism toWrap , final AuthMechanism mechanism ) { } }

Fix:
HttpServerLogger . ROOT_LOGGER . errorContextModuleNotFound ( ( consoleSlot == null ? "main" : consoleSlot ) ) ;