Stripes doesn't work on WebSphere 8.x
-------------------------------------

                 Key: STS-905
                 URL: http://www.stripesframework.org/jira/browse/STS-905
             Project: Stripes
          Issue Type: Bug
          Components: ActionBean Dispatching
    Affects Versions: Release 1.5.7
         Environment: IBM WebSphere, 8.0.0.6
Build Number: cf061312.03
Build Date: 3/28/13
            Reporter: Jan Novotný


Running latest Stripes on WebSphere 8.0.0.6 fails - for all pages that should 
be served by Stripes only HTTP 404 screen is displayed. All this is due 
following exception:

java.io.FileNotFoundException: SRVE0190E: File not found: /login
        at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:248)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at 
net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:397)
        at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at 
com.fg.kb.priv.user.web.filter.UserLoggedFilter.doFilter(UserLoggedFilter.java:82)
        at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at 
com.fg.kb.priv.user.web.filter.VariableSetupFilter.doFilter(VariableSetupFilter.java:67)
        at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at 
com.fg.lib.shared.v1.servlet.filter.EncodingFilter.doFilter(EncodingFilter.java:82)
        at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at 
com.fg.kb.priv.util.web.filter.ExceptionLoggingFilter.doFilter(ExceptionLoggingFilter.java:54)
        at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3763)
        at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
        at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:975)
        at 
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
        at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
        at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
        at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
        at 
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:166)
        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:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at 
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1691)
Caused by: java.io.FileNotFoundException: SRVE0190E: File not found: /login
        at 
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor._processEDR(DefaultExtensionProcessor.java:908)
        at 
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.processEDR(DefaultExtensionProcessor.java:889)
        at 
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:450)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
        at 
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:260)
        at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        ... 37 more

There is following code:

// Catch FileNotFoundException, which some containers (e.g. GlassFish) throw 
instead of setting SC_NOT_FOUND
boolean fileNotFoundExceptionThrown = false;
try {
  chain.doFilter(request, wrapper);
}
catch (FileNotFoundException exc) {
   fileNotFoundExceptionThrown = true;
}

But unfortunatelly WebSphere wraps FileNotFoundException in ServletException 
and thus catch block is not executed.

PATCH:
I've cloned the class and patched the code to this version:

// Catch FileNotFoundException, which some containers (e.g. GlassFish) throw 
instead of setting SC_NOT_FOUND
boolean fileNotFoundExceptionThrown = false;

try {
    chain.doFilter(request, wrapper);
}
catch (FileNotFoundException exc) {
    fileNotFoundExceptionThrown = true;
}
catch (ServletException ex) {
    if (ex.getCause() instanceof FileNotFoundException) {
        fileNotFoundExceptionThrown = true;
    } else {
        throw ex;
    }
}

... and I can confirm that this version works with WebSphere 8.0.0.6 ok.
It may be valuable for other users if this patch gets into the core.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to