Buggy code:
public class Host implements WebHost , Service < Host > { private final PathHandler pathHandler = new PathHandler ( ) ; private final Set < String > allAliases ; private final String name ; private final InjectedValue < Server > server = new InjectedValue ( ) ; private final InjectedValue < UndertowService > undertowService = new InjectedValue ( ) ; private final Set < Deployment > deployments = new CopyOnWriteArraySet < > ( ) ; protected Host ( String name , List < String > aliases ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } @ Override public Host getValue ( ) throws IllegalArgumentException , IllegalStateException { } protected InjectedValue < Server > getServerInjection ( ) { } public Server getServer ( ) { } protected InjectedValue < UndertowService > getUndertowService ( ) { } public Set < String > getAllAliases ( ) { } public String getName ( ) { } protected HttpHandler getRootHandler ( ) { } public void registerDeployment ( final Deployment deployment , HttpHandler handler ) { } public void unregisterDeployment ( final Deployment deployment ) { } public void registerHandler ( String path , HttpHandler handler ) { } public void unregisterHandler ( String path ) { } public Set < String > getContexts ( ) { } public Set < Deployment > getDeployments ( ) { } @ Override public WebDeploymentController addWebDeployment ( final WebDeploymentBuilder webDeploymentBuilder ) throws Exception { DeploymentInfo d = new DeploymentInfo ( ) ; d . setDeploymentName ( webDeploymentBuilder . getContextRoot ( ) ) ; d . setContextPath ( webDeploymentBuilder . getContextRoot ( ) ) ; d . setClassLoader ( webDeploymentBuilder . getClassLoader ( ) ) ; <START_BUG> d . setResourceManager ( new FileResourceManager ( new File ( webDeploymentBuilder . getDocumentRoot ( ) . getAbsolutePath ( ) ) ) ) ; <END_BUG> for ( ServletBuilder servlet : webDeploymentBuilder . getServlets ( ) ) { ServletInfo s ; if ( ( servlet . getServlet ( ) ) == null ) { s = new ServletInfo ( servlet . getServletName ( ) , ( ( Class < ? extends Servlet > ) ( servlet . getServletClass ( ) ) ) ) ; } else { s = new ServletInfo ( servlet . getServletName ( ) , ( ( Class < ? extends Servlet > ) ( servlet . getServletClass ( ) ) ) , new io . undertow . servlet . util . ImmediateInstanceFactory ( servlet . getServlet ( ) ) ) ; } if ( servlet . isForceInit ( ) ) { s . setLoadOnStartup ( 1 ) ; } s . addMappings ( servlet . getUrlMappings ( ) ) ; for ( Map . Entry < String , String > param : servlet . getInitParams ( ) . entrySet ( ) ) { s . addInitParam ( param . getKey ( ) , param . getValue ( ) ) ; } d . addServlet ( s ) ; } return new Host . WebDeploymentControllerImpl ( d ) ; } private class WebDeploymentControllerImpl implements WebDeploymentController { private final DeploymentInfo deploymentInfo ; private volatile DeploymentManager manager ; private WebDeploymentControllerImpl ( final DeploymentInfo deploymentInfo ) { } @ Override public void create ( ) throws Exception { } @ Override public void start ( ) throws Exception { } @ Override public void stop ( ) throws Exception { } @ Override public void destroy ( ) throws Exception { } } }

Fix:
d . setResourceManager ( new FileResourceManager ( new File ( webDeploymentBuilder . getDocumentRoot ( ) . getAbsolutePath ( ) ) , ( 1024 * 1024 ) ) ) ;