Uploaded image for project: 'Spring Batch Admin'
  1. Spring Batch Admin
  2. BATCHADM-91

NPE in ContentTypeInterceptor: On WebSphere the method request.getPathInfo() returns null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.1
    • Component/s: Manager
    • Labels:
      None
    • Environment:
      WebSphere 6.1

      Description

      The method-call String path = WebUtils.extractFullFilenameFromUrlPath(request.getPathInfo()); throws a NullPointerException, because the pathInfo is null and the method only accepts not-null values.
      I am not sure where it should be fixed (Spring Web oder Spring Batch Admin?). Is there maybe a workaround?

      Note: The first call against the application works, because then the method returns "/".

      Stacktrace:

      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
      	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1097)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1038)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
      	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
      	at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:58)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:834)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:682)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:566)
      	at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
      	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
      	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
      	at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
      	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
      	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
      	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
      	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
      	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
      	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
      	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
      Caused by: java.lang.NullPointerException
      	at org.springframework.web.util.WebUtils.extractFullFilenameFromUrlPath(WebUtils.java:670)
      	at org.springframework.batch.admin.web.interceptor.ContentTypeInterceptor.postHandle(ContentTypeInterceptor.java:96)
      	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
      	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      	... 34 more
      

        Attachments

          Activity

            People

            Assignee:
            david_syer Dave Syer
            Reporter:
            denschu Dennis Schulte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: