4 Replies Latest reply on Aug 14, 2017 1:21 PM by gir489

    NoClassDefFoundError: Failed to link com/internal/DirectoryServlet (Module "deployment.app.ear:main" from Service Module Loader): io/undertow/servlet/handlers/DefaultServlet

    gir489 Novice

      I'm currently battling with a servlet trying to deploy and locate the DefaultServlet class from undertow. Originally it was complaining about org.apache.catalina.servlets.DefaultServlet, and I figured this was from how we were using jbossweb.jar, so I removed that dependency from the ANT build, and replaced it with undertow-servlet-1.3.15.Final.jar. But now it's complaining it can't find undertow which makes no sense... So I think there's a greater issue at hand here, of Wildfly not loading modules for me properly, and I'm not sure why... If I drop the undertow-servlet-1.3.15.Final.jar in the lib folder, that specific error goes away, but then it complains about java.lang.NoClassDefFoundError: Lio/undertow/server/handlers/resource/ResourceManager;, which seems like it wants another JAR.

       

      I don't think it'd be a bright idea to tie our app to specific version of Wildfly, as we learned what happens when you do that with JBoss 4... So I'd rather have it try to resolve it through the Wildfly resource manager.