[ 
http://www.stripesframework.org/jira/browse/STS-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11178#action_11178
 ] 

David G. Friedman commented on STS-488:
---------------------------------------

I just refreshed SVN and rebuilt and now that "solution" seems to kill 10-20 
different tests in the suite with this error message:

java.lang.IllegalStateException: A request made it through to some part of 
Stripes without being wrapped in a StripesRequestWrapper. The StripesFilter is 
responsible for wrapping the request, so it is likely that either the 
StripesFilter is not deployed, or that it's mappings do not include the 
DispatcherServlet _and_ *.jsp. Stripes does not requiire that the Stripes 
wrapper is the only request wrapper, or the outermost; only that is is present.
        at 
net.sourceforge.stripes.controller.StripesRequestWrapper.findStripesWrapper(StripesRequestWrapper.java:81)
        at 
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:229)
        at 
net.sourceforge.stripes.mock.MockFilterChain.doFilter(MockFilterChain.java:63)
        at 
net.sourceforge.stripes.mock.MockServletContext.acceptRequest(MockServletContext.java:256)
        at 
net.sourceforge.stripes.mock.MockRoundtrip.execute(MockRoundtrip.java:171)
        at 
net.sourceforge.stripes.mock.MockRoundtrip.execute(MockRoundtrip.java:183)
        at 
net.sourceforge.stripes.mock.TestMockRoundtrip.testFetchingRequestAttributes(TestMockRoundtrip.java:212)
... Removed 21 stack frames

My IDE must have cached something incorrectly earlier today.

-David

> StripesRunTimeException in StripesFilter during test suite
> ----------------------------------------------------------
>
>                 Key: STS-488
>                 URL: http://www.stripesframework.org/jira/browse/STS-488
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5
>         Environment: JDK 1.6.0_03-b05, on Ubuntu Linux 7.10 with Trunk 
> version 794
>            Reporter: David G. Friedman
>            Assignee: Tim Fennell
>            Priority: Minor
>
> In my own Test suites and the nightly build this Exception keeps appearing:
> net.sourceforge.stripes.exception.StripesRuntimeException: Something is 
> trying to access the current Stripes configuration but the current request 
> was never routed through the StripesFilter! As a result the appropriate 
> Configuration object cannot be located. Please take a look at the exact URL 
> in your browser's address bar and ensure that any requests to that URL will 
> be filtered through the StripesFilter according to the filter mappings in 
> your web.xml.
> If we alter the StripesFilter.init() method and add 2 lines so we go from:
>         this.configuration.setBootstrapPropertyResolver(bootstrap);
>         this.configuration.init();
>         Package pkg = getClass().getPackage();
>        
> To:
>         this.configuration.setBootstrapPropertyResolver(bootstrap);
>         this.configuration.init();
>         configurationStash.set(this.configuration); // my change part I
>         initialInvocation.set(false);                             // my 
> change part II
>         Package pkg = getClass().getPackage();
> Then the Exception disappears on the TestNG suite. Since the doFilter() 
> references the ThreadLocal shouldn't the init() be storing the first thread's 
> configuration there too?  I don't know why but in TestNG that configuration 
> object is being lost by the StripesFilter.  This makes no sense to me unless 
> the Mock suite works strangely with  filters.  I tried adding printlns but it 
> showed the thread was always the same Id.  Regardless, my 2 line fix stores 
> the configuration in ThreadLocal so it is persisted throughout the test suite 
> and the 4 instances of this exception disappear (and my own testSuite runs 
> cleaner).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to