Hi all,

I'm using Stripes 1.5.6 and I systematically encounter a problem when I use
Layout reuse with Resin 4.0.23. The code I use is exactly the same as the one in
the first example under the Layout Reuse example:

http://www.stripesframework.org/display/stripes/Layout+Reuse

(not the one with the jsp:include, obviously; though using jsp:include works
fine for me)

What I get is the following stacktrace:

java.lang.ClassCastException: com.caucho.jsp.StreamJspWriter cannot be cast to
com.caucho.jsp.BodyContentImpl

net.sourceforge.stripes.exception.StripesServletException: Unhandled exception
in exception handler.
        at net.sourceforge.stripes.exception.DefaultExceptionHandler.handle(
DefaultExceptionHandler.java:167)
        at net.sourceforge.stripes.controller.StripesFilter.doFilter(
StripesFilter.java:250)
        at com.caucho.server.dispatch.FilterFilterChain.doFilter(
FilterFilterChain.java:89)
        at com.caucho.server.webapp.WebAppFilterChain.doFilter(
WebAppFilterChain.java:156)
        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(
AccessLogFilterChain.java:95)
        at com.caucho.server.dispatch.ServletInvocation.service(
ServletInvocation.java:289)
        at com.caucho.server.http.HttpRequest.handleRequest(
HttpRequest.java:811)
        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(
TcpSocketLink.java:1215)
        at com.caucho.network.listen.TcpSocketLink.handleRequest(
TcpSocketLink.java:1171)
        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(
TcpSocketLink.java:1155)
        at com.caucho.network.listen.TcpSocketLink.handleRequests(
TcpSocketLink.java:1078)
        at com.caucho.network.listen.TcpSocketLink.handleAcceptTask(
TcpSocketLink.java:907)
        at com.caucho.network.listen.AcceptTask.doTask(
AcceptTask.java:74)
        at com.caucho.network.listen.ConnectionTask.runThread(
ConnectionTask.java:97)
        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:80)
        at com.caucho.network.listen.AcceptTask.run(AcceptTask.java:59)
        at com.caucho.env.thread.ResinThread.runTasks(ResinThread.java:164)
        at com.caucho.env.thread.ResinThread.run(ResinThread.java:130)
Caused by: java.lang.ClassCastException: com.caucho.jsp.StreamJspWriter
cannot be cast to com.caucho.jsp.BodyContentImpl
        at com.caucho.jsp.PageContextImpl.popBody(PageContextImpl.java:683)
        at net.sourceforge.stripes.tag.layout.LayoutContext.pop(
LayoutContext.java:107)
        at net.sourceforge.stripes.tag.layout.LayoutRenderTag.doEndTag(
LayoutRenderTag.java:175)
        at _jsp._WEB_22dINF._jsp._quoteDisplay__jsp._jspService(
WEB-INF/jsp/quoteDisplay.jsp:6)
        at _jsp._WEB_22dINF._jsp._quoteDisplay__jsp._jspService(
_quoteDisplay__jsp.java:29)
        at com.caucho.jsp.JavaPage.service(JavaPage.java:64)
        at com.caucho.jsp.Page.pageservice(Page.java:542)
        at com.caucho.server.dispatch.PageFilterChain.doFilter(
PageFilterChain.java:194)
        at
com.caucho.server.webapp.DispatchFilterChain.doFilter(
DispatchFilterChain.java:126)
        at com.caucho.server.dispatch.ServletInvocation.service(
ServletInvocation.java:289)
        at com.caucho.server.webapp.RequestDispatcherImpl.forward(
RequestDispatcherImpl.java:298)
        at com.caucho.server.webapp.RequestDispatcherImpl.forward(
RequestDispatcherImpl.java:116)
        at net.sourceforge.stripes.action.ForwardResolution.execute(
ForwardResolution.java:110)
        at net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(
DispatcherHelper.java:508)
        at net.sourceforge.stripes.controller.ExecutionContext.proceed(
ExecutionContext.java:158)
        at net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(
HttpCacheInterceptor.java:99)
        at net.sourceforge.stripes.controller.ExecutionContext.proceed(
ExecutionContext.java:155)
        at 
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(
BeforeAfterMethodInterceptor.java:113)
        at net.sourceforge.stripes.controller.ExecutionContext.proceed(
ExecutionContext.java:155)
        at net.sourceforge.stripes.controller.ExecutionContext.wrap(
ExecutionContext.java:74)
        at
net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(
DispatcherHelper.java:502)
        at 
net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(
DispatcherServlet.java:286)
        at
net.sourceforge.stripes.controller.DispatcherServlet.service(
DispatcherServlet.java:170)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:96)
.........................................
(the rest is highly uninteresting, though if you really want me to I can still
post it, but I didn't want to clutter more my post))

Note that strictly the same code, besides being the one from the example, works
fine when I run it with tomcat 6. 
Furthermore, I haven't seen anyone having had this issue anywhere else on the
internet.

(I'm not 100% certain the culprit is Stripes, it could also be Resin, or even
me, but here was the place that was most likely to be the right one)

Thanks for an answer :)


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to