|
[
Permalink
| « Hide
]
Gareth Davis added a comment - 02/Jul/08 03:56 PM
Tomcat 6.0.16 implementation of StandardHostValue, see invoke(Request,Response)
Wouldn't it also work if we removed the Spring-exposed error attributes after we rendered the Spring error view - that is, before returning control to the servlet container?
Juergen I've checked that removing those error-view-driven servlet request attributes after rendering does actually work on Tomcat (again). I've committed this for the next 2.5.6 snapshot (http://static.springframework.org/downloads/nightly/snapshot-download.php?project=SPR
Juergen BTW, the reason why this wasn't noticed during 2.5.5 pre-release testing (which includes running the sample applications on Tomcat) is that the PetClinic sample app has both a Spring-driven error view and a standard JSP error page in web.xml configured. The rendered error pages differ in their header message only, which is why it was easy to miss that it suddenly said "Internal error" (the web.xml error page) instead of e.g. "Data access error" (the more specific Spring-driven error view).
Juergen That was the solution I was trying to suggest
I'll check out the update tomorrow, thanks. Gareth I can confirm the update fixed the problem.
I ran into the same bug with 2.5.5. Updating to 2.5.6 build #615 made the problem go away. Thanks! I just ran into this problem and build 630 did the trick for me. Thanks for the fix!
For anyone who needs to pick up this fix, remember to get this fix you have to upgrade your spring-webmvc.jar, not just spring.jar I got this issue for many weeks, SimpleMappingExceptionResolver doesn't work. Thanks.
we got the same issue with dm-server (spring 2.5.5A, next version maybe with 2.5.6, which contains this fix)
as all exceptions were "translated" to error 500, we patched our local 2.5.5 with Jürgen's fix (thanks), otherwise Spring MVC was unusable for us. I'm find a related problem - please see last post:
[url]http://forum.springsource.org/showthread.php?p=223433#post223433[/url] essentially: create controller, throw RuntimeException in handleRequest, in HandlerExceptionResolver just return ModelAndView page in resolveException. Request is correctly routed but gives org.apache.catalina.core.StandardHostValve/IllegalStateException stack trace in logs. I have a strange problem with SimpleMappingExceptionResolver. I configured it to catch any exception by setting java.lang.Exception.
If I trying to catch exception from Controller - it works fine. But if exception thrown from WebFlow handler - it shows me 500 status. I also noticed that request attributes in first and second case distinguish by only one attribute: org.springframework.web.servlet.HandlerMapping.pathWithinHandlerMapping=<someone URL>. What is a problem? As I read in WebFlow documentation all unhandled exception go to Dispatcher. I tried to trace all calls and saw that Tomcat gets exception object from request and renders status 500 page. Tomcat 6.0.18 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||