[Seasar-user:21302] Re: [mayaa] Exception while handling error, null というエラーについて

suga [E-MAIL ADDRESS DELETED]
2012年 3月 27日 (火) 15:11:18 JST


suga です。

engine タグの  class="org.seasar.mayaa.impl.engine.EngineImpl" を削除すればあとは問題ありません。

class を書かなければ、デフォルトで生成されたオブジェクトに対しての追加設定動作をします。
class を書くとデフォルトで生成されたものを破棄して作り直します。

ドキュメントには class 無しで記述してあります。
http://mayaa.seasar.org/documentation/engine_settings.html


class を書く例は別ページにありますが、class 有無による挙動の違いについては説明がありませんね……。

--
suga ( [E-MAIL ADDRESS DELETED] )



2012/3/27 decoy <[E-MAIL ADDRESS DELETED]>:
> suga様
>
> お世話になります。
> decoyです。
>
> ご回答頂き有難う御座います。
>
> ご指摘のとおり、org.seasar.mayaa.provider.ServiceProviderファイルが
> 独自のものに差し替えられており、構成が変更されておりました。
>
>> この8〜11行目部分です。
>> http://www.seasar.org/source/browse/mayaa/trunk/mayaa/src-impl/org/seasar/mayaa/impl/provider/factory/org.seasar.mayaa.provider.ServiceProvider?revision=3474&view=markup&sortby=rev&pathrev=3476
>
> さらに上記の8〜11行目に記載されている
>
> <errorHandler class="org.seasar.mayaa.impl.engine.error.TemplateErrorHandler">
>  <parameter name="folder" value="/"/>
>  <parameter name="extension" value="html"/>
> </errorHandler>
>
> 上記の内容がない状態となっておりました。
>
> 早速追記したいと思いますが、改めてデフォルトで用意されているorg.seasar.mayaa.provider.ServiceProviderファイルと
> こちらのorg.seasar.mayaa.provider.ServiceProviderファイルを見比べてみたところ、
> デフォルトには存在して、こちらには存在しないものが多数あり、かなり差異がある状態となっております。
>
> このような場合はデフォルトから設定を取得するものと
> 今回の<errorHandler>のように存在しない事で問題となるケースがあるかと思いますが
> こちらのServiceProviderファイルは下記のようになっております。
>
> 下記の設定で<errorHandler>以外に問題となる箇所はありませんでしょうか。
> 下記の設定で<errorHandler>以外に記述されていない事で問題となるケースがありましたらご指摘頂けますでしょうか。
>
>
>
> <?xml version="1.0" encoding="Shift_JIS"?>
> <!DOCTYPE provider
>    PUBLIC "-//The Seasar Foundation//DTD Mayaa Provider 1.0//EN"
>    "http://mayaa.seasar.org/dtd/mayaa-provider_1_0.dtd">
> <provider>
>    <engine class="org.seasar.mayaa.impl.engine.EngineImpl">
>        <parameter name="defaultSpecification" value="/default.mayaa"/>
>        <parameter name="suffixSeparator" value="$"/>
>        <parameter name="pageSerialize" value="true"/>
>        <parameter name="autoBuild" value="false"/>
>        <parameter name="autoBuild.fileNameFilters" value=".html"/>
>        <parameter name="templatePathPattern" value="/hoge/.*\.html"/>
>    </engine>
>        <templateAttributeReader>
>                <ignoreAttribute
>                        qName="{http://struts.apache.org/tags-html}text"
>                        attribute="value" />
>                <ignoreAttribute
>                        qName="{http://struts.apache.org/tags-html}textarea"
>                        attribute="value" />
>
>                <aliasAttribute
>                        qName="{http://struts.apache.org/tags-html}*"
>                        attribute="styleId"
>                        templateAttribute="id" />
>                <aliasAttribute
>                        qName="{http://struts.apache.org/tags-html}*"
>                        attribute="styleClass"
>                        templateAttribute="class" />
>                <aliasAttribute
>                        qName="{http://customize.co.jp}*"
>                        attribute="styleId"
>                        templateAttribute="id" />
>                <aliasAttribute
>                        qName="{http://customize.co.jp}*"
>                        attribute="styleClass"
>                        templateAttribute="class" />
>                <aliasAttribute
>                        qName="{http://customize.co.jp}*"
>                        attribute="styleId"
>                        templateAttribute="id" />
>
>        <parameter name="enabled" value="true" />
>    </templateAttributeReader>
>
> </provider>
>
>
>
> 以上、お手数をお掛けして申し訳ありませんが宜しくお願い致します。
>
> // decoy
>
>
>
> 2012年3月27日10:24 suga <[E-MAIL ADDRESS DELETED]>:
>> suga です。
>>
>> Mayaaのエンジン設定で、ErrorHandlerが設定されていない状態になっています。
>> org.seasar.mayaa.provider.ServiceProvider ファイルで構成を変更されているのではないでしょうか。
>>
>> この8〜11行目部分です。
>> http://www.seasar.org/source/browse/mayaa/trunk/mayaa/src-impl/org/seasar/mayaa/impl/provider/factory/org.seasar.mayaa.provider.ServiceProvider?revision=3474&view=markup&sortby=rev&pathrev=3476
>>
>> --
>> suga ( [E-MAIL ADDRESS DELETED] )
>>
>>
>>
>> 2012/3/26 decoy <[E-MAIL ADDRESS DELETED]>:
>>> お世話になります。
>>> decoyです。
>>>
>>> 以下の環境でmayaaを使用しているプロジェクトがあり、
>>> 頻繁に下記のエラーが発生する状況となっているのですが、
>>> 下記のエラーはどういった時に発生するエラーなのかご教授頂けますでしょうか。
>>>
>>> その他、不足している情報等がありましたら提示させて頂きますのでご指示下さい。
>>>
>>>
>>> 実行環境↓
>>>
>>> Apache2.2.3
>>> tomcat6.0.18
>>> seasar2.4.37
>>> SAStruts1.0.4-sp5
>>> mayaa1.1.26
>>>
>>>
>>> エラー内容↓
>>>
>>>
>>> FATAL 2012-XX-XX XX:XX:XX,XXX [TP-Processor7] Exception while handling
>>> error, null
>>> java.lang.IllegalStateException
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.getErrorHandler(EngineImpl.java:108)
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.handleError(EngineImpl.java:184)
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.doPageService(EngineImpl.java:398)
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.doService(EngineImpl.java:493)
>>>        at org.seasar.mayaa.impl.MayaaServlet.doService(MayaaServlet.java:97)
>>>        at org.seasar.mayaa.impl.MayaaServlet.doGet(MayaaServlet.java:80)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>        at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:71)
>>>        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:79)
>>>        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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
>>>        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
>>>        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
>>>        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>>>        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
>>>        at org.seasar.struts.action.S2RequestProcessor.doForward(S2RequestProcessor.java:307)
>>>        at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
>>>        at org.seasar.struts.action.S2RequestProcessor.process(S2RequestProcessor.java:129)
>>>        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>>>        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>        at org.seasar.extension.filter.RequestDumpFilter.doFilter(RequestDumpFilter.java:127)
>>>        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:71)
>>>        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:79)
>>>        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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
>>>        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
>>>        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
>>>        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>>>        at org.seasar.struts.filter.RoutingFilter.forward(RoutingFilter.java:219)
>>>        at org.seasar.struts.filter.RoutingFilter.doFilter(RoutingFilter.java:99)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
>>>        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:71)
>>>        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:79)
>>>        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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
>>>        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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
>>>        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>>>        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
>>>        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
>>>        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
>>>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>>>        at java.lang.Thread.run(Thread.java:619)
>>> FATAL 2012-XX-XX XX:XX:XX,XXX [TP-Processor7] Exception while handling
>>> error, null
>>> java.lang.IllegalStateException
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.getErrorHandler(EngineImpl.java:108)
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.handleError(EngineImpl.java:184)
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.doPageService(EngineImpl.java:398)
>>>        at org.seasar.mayaa.impl.engine.EngineImpl.doService(EngineImpl.java:493)
>>>        at org.seasar.mayaa.impl.MayaaServlet.doService(MayaaServlet.java:97)
>>>        at org.seasar.mayaa.impl.MayaaServlet.doGet(MayaaServlet.java:80)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>        at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:71)
>>>        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:79)
>>>        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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
>>>        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
>>>        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
>>>        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>>>        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
>>>        at org.seasar.struts.action.S2RequestProcessor.doForward(S2RequestProcessor.java:307)
>>>        at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
>>>        at org.seasar.struts.action.S2RequestProcessor.process(S2RequestProcessor.java:129)
>>>        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>>>        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>        at org.seasar.extension.filter.RequestDumpFilter.doFilter(RequestDumpFilter.java:127)
>>>        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:71)
>>>        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:79)
>>>        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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
>>>        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
>>>        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
>>>        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>>>        at org.seasar.struts.filter.RoutingFilter.forward(RoutingFilter.java:219)
>>>        at org.seasar.struts.filter.RoutingFilter.doFilter(RoutingFilter.java:99)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
>>>        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:71)
>>>        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:79)
>>>        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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
>>>        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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
>>>        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>>>        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
>>>        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
>>>        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
>>>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>>>        at java.lang.Thread.run(Thread.java:619)
>>> _______________________________________________
>>> Seasar-user mailing list
>>> [E-MAIL ADDRESS DELETED]
>>> https://ml.seasar.org/mailman/listinfo/seasar-user
>> _______________________________________________
>> Seasar-user mailing list
>> [E-MAIL ADDRESS DELETED]
>> https://ml.seasar.org/mailman/listinfo/seasar-user
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user


Seasar-user メーリングリストの案内