On 16/11/2019 22:08, Adam Rauch wrote: > While testing 8.5.48, we now see NullPointerExceptions when our > ImageServlet code attempts to forward a request to a new location. In > 8.5.47, the code works fine.
Thanks for reporting this. I can see what the problem is. I updated the servlet4preview API in 8.5.x to align it with what was released in Servlet 4 (some names changed). As part of that I aligned the 8.5.x implementation code with 9.0.x. That removed a null check that 8.5.x needs. I'll cancel the 8.5.48 vote, get that fixed and roll an 8.5.49 release. Mark > > A simplified version of our code: > > public void sendResource(HttpServletRequest request, > HttpServletResponse response) throws IOException, ServletException > { > request.getRequestDispatcher(getForwardLocation(request)).forward(request, > response); > } > > The NPE stack trace we see: > > java.lang.NullPointerException > at > org.apache.catalina.core.ApplicationMapping.getHttpServletMapping(ApplicationMapping.java:36) > > at > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:380) > > at > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316) > > at > org.labkey.api.settings.TemplateResourceHandler.sendResource(TemplateResourceHandler.java:202) > > at > org.labkey.api.attachments.ImageServlet.service(ImageServlet.java:72) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) > > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) > > at > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > > Let me know if you'd like me to open a Bugzilla and/or provide more > context. > > Thanks, > Adam > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org