cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: Trunk broken?
Date Wed, 27 Dec 2006 19:36:50 GMT
On 27.12.2006 19:05, Reinhard Poetz wrote:

>> I removed our own implementation in favour of Spring's
>> RequestContextHolder. The attributes are used to keep track of poolable
>> components and to release them when the request is finished.
>> Therefore you should add the Spring's request context listener to your
>> web.xml (I added it to web.xml in svn); this listener requires servlet
>> spec 2.4.
> For some reasons the use of the 
> org.springframework.web.context.request.RequestContextListener caused 
> this exception:
> java.lang.IllegalStateException: No thread-bound request found: Are you 
> referring to request attributes outside of an actual web request? If you 
> are actually operating within a web request and still receive this 
> message,your code is probably running outside of 
> DispatcherServlet/DispatcherPortlet: In this case, use 
> RequestContextListener or RequestContextFilter to expose the current 
> request.

That's the descriptive exception I talked about when 
RequestContextHolder does actually not hold a RequestAttributes 
instance. It's caused by the mentioned null check instead of the NPE you 

If you use web.xml as is (the one you committed, [1]) the Listener does 
not work because of servlet 2.3 while you need 2.4. IIRC we decided to 
switch to 2.4, so it would be better to change the DTD/schema 
declaration to 2.4 in that web.xml.



View raw message