On 24/06/2020 17:25, tomcat-s...@stiprus.com wrote: > I have a web application which is failing in RestEasy initialization with an > NPE. It worked for many years until I added a large number of jar > dependencies because of a new development effort. I've debugged the code by > stepping through the Tomcat source to the point I've found where it is > failing. It seems to be a Tomcat bug but of course I'm not convinced since it > is highly more likely it is my problem. > > Tomcat version is 9.0.36, though the failure happens in the Tomcat 8 versions > I've tried as well. > > The NPE is triggered by a single "return null" statement in > org.apache.catalina.core.ApplicationContext line 933. Below is a code snippet > of where the return statement is. In my failing scenario the wrapper is NOT > null and isOverridable is already returning false. So it falls through to > return null. > > So here is my question: Why in the world in the code below does the return > null statement even exist?
Because the Servlet API methods it supports are documented to return null if: <quote> ...this ServletContext already contains a complete ServletRegistration for the given servletName </quote> Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org