where do you get this CNFE? at your build?
what is your code doing that needs direct access to DefaultServlet (and it did with jboss-web as well)
the class you are looking for is in undertow-core jar
It's happening during the deploy, when Wildfly is trying to link my custom servlet with the runtime.
It's extending it so it can intercept each call to the servlet, and check if the URL is valid, if it's not, it forwards the request to the main page.
I'm aware of this, as I'm currently just dropping the core and IO JARs in to the lib folder and bypassing this error, but I'd rather have Wildfly load the latest JAR it comes with, from the resource loader.
1 of 1 people found this helpful
Have you considered a standard Servlet Filter to intercept all the calls going to your Servlets? That will be more portable.
Thanks. I looked in to what Undertow was extending for DefaultServlet and it was HttpServlet from the javax library. Removing that undertow dependency actually fixed an unusual error I was dealing with:
Caused by: java.lang.ClassCastException: io.undertow.servlet.spec.ServletContextImpl cannot be cast to io.undertow.servlet.spec.ServletContextImpl