[Seasar-user:20219] Re: UnitTestでOgnlRuntimeException

takechi take [E-MAIL ADDRESS DELETED]
2010年 10月 6日 (水) 20:13:38 JST


小林様
ありがとうございました。
お教えいただいたとおり修正したところ
実行できました!

2010年10月6日0:00 Koichi Kobayashi <[E-MAIL ADDRESS DELETED]>:

> 小林 (koichik) です.
>
> Date:    Tue, 5 Oct 2010 18:11:02 +0900
> From:    takechi take <[E-MAIL ADDRESS DELETED]>
> To:      [E-MAIL ADDRESS DELETED]
> Subject: [Seasar-user:20215] UnitTestでOgnlRuntimeException
>
> > 初めまして。初心者takechiと申します。
> > jdbcmanagerをプロパティに持つserviceを作成してUnitTestを行おうとしたところ
> > 以下のエラーが出ました。
> > org.seasar.framework.exception.OgnlRuntimeException:
> > [ESSR0073]OGNLで例外が発生しました。
> > 理由はNeed to specify class name in environment or system property, or as an
> > applet parameter, or in an application resource file:
> > java.naming.factory.initial at file:
> > ・・・・・・・/workspace3.3Europa/training/jta-wls.dicon(20)
>
> JUnit 環境で WebLogic 用の dicon ファイル
> (jta-wls.dicon) を使っているのが原因でしょう.
>
> おそらく s2container.dicon に
>
> <component
> class="org.seasar.framework.container.factory.SimplePathResolver">
>  <initMethod name="addRealPath">
>    <arg>"jta.dicon</arg>
>    <arg>"jta-wls.dicon"</arg>
>  </initMethod>
> </component>
>
> という記述があると思います.
> これを別の dicon に切り出して,s2container.dicon で
> 単体テスト時以外だけ条件インクルードするように
> してください.
>
>> ・s2container.dicon
>
> <components>
>  <include condition="#ENV != 'ut'" path="path-resolver.dicon"/>
>  ...
> </components>
>
> ・path-resolver.dicon
>
> <components>
>  <component
> class="org.seasar.framework.container.factory.SimplePathResolver">
>    <initMethod name="addRealPath">
>      <arg>"jta.dicon</arg>
>      <arg>"jta-wls.dicon"</arg>
>    </initMethod>
>  </component>
> </components>
>
>
>
> --
> <component name="koichik">
>    <property name="fullName">"Koichi Kobayashi"</property>
>    <property name="email">"[E-MAIL ADDRESS DELETED]"</property>
>    <property name="blog">"http://d.hatena.ne.jp/koichik"</property>
>    <property name="twitter">"http://twitter.com/koichik"</property>
> </component>
>
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20101006/ccb4cf46/attachment.html>


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