2010年10月8日金曜日

Teeda sendRedirectでIllegalStateException

Teedaでrendererの拡張を行っているのですが、sendRedirectでIllegalStateExceptionが発生。
java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
    at org.seasar.teeda.core.util.ServletExternalContextUtil.redirect(ServletExternalContextUtil.java:188)
    at org.seasar.teeda.extension.context.TmsServletExternalContextImpl.redirect(TmsServletExternalContextImpl.java:298)
    at org.seasar.teeda.core.util.NavigationHandlerUtil.redirect(NavigationHandlerUtil.java:55)
    at org.seasar.teeda.extension.util.TeedaExtensionErrorPageManagerImpl.handleException(TeedaExtensionErrorPageManagerImpl.java:84)
    at org.seasar.teeda.core.lifecycle.LifecycleImpl.handleException(LifecycleImpl.java:116)
    at org.seasar.teeda.core.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:101)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at jp.co.isid.fine.io.file.UploadFilter.doFilter(UploadFilter.java:60)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.seasar.teeda.core.filter.RequestDumpFilter.doFilter(RequestDumpFilter.java:125)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:69)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at jp.mufg.tms.base.web.filter.SessionInvalidateFilter.doFilter(SessionInvalidateFilter.java:47)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at jp.mufg.tms.base.web.filter.ThreadLocalFilter.doFilter(ThreadLocalFilter.java:72)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at jp.mufg.tms.base.web.filter.NocacheFilter.doFilter(NocacheFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)


スタックトレース見ればわかりますが、レンダリングでエラーが発生した場合は
org.seasar.teeda.core.lifecycle.LifecycleImpl#handleExceptionにデバッグいれると
エラーの内容がわかりますね。

jspで開発していた時に、jsp:includeを使用してflush="ture"にしている場合に、
カスタムタグ内でsendRedirectすると似たような例外が発生した記憶があったので、
(レスポンスをコミットした状態[表示結果を一部でも返している状態]でリダイレクトしていたため)
一瞬全然見当違いな調査をしてしまったのですが、Pageクラスのgetterの名前が正しくないだけでした。。(おつ

0 件のコメント:

コメントを投稿