Carsten Ziegeler wrote:
Joerg Heinicke wrote:
On 27.12.2006 13:48, Reinhard Poetz wrote:

Does anybody else see this error message when he tries to use the latest snapshot from trunk?

java.lang.NullPointerException
at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:50)

Line 50 of the PoolableProxyHandler is

RequestContextHolder.getRequestAttributes().removeAttribute(this.attributeName, RequestAttributes.SCOPE_REQUEST);
Don't know about Cocoon trunk yet, but if RequestContextHolder is the one delivered with Spring you need a component setting the RequestAttributes on the RequestContextHolder. Therefore you can use RequestContextListener or RequestContextFilter and declare it in web.xml.

Exactly :)
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.

Thanks Carsten and Jörg! After adding the org.springframework.web.filter.RequestContextFilter, the reloading classloader (works like the shielded cl) works for me again.

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.

Don't know what's wrong here, but I won't investigate further because together with the manipulation of the classloading mechanism like the reloading classloader does, things are often difficult to debug at that level.

--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                       web(log): http://www.poetz.cc
--------------------------------------------------------------------



        
                
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Reply via email to