[Seasar-user:9020] Re: [Teeda]カスタムバリデータ内にあるDaoと同じDaoをページで使用するとエラーになってしまう
Shinpei Ohtani
[E-MAIL ADDRESS DELETED]
2007年 7月 9日 (月) 00:16:44 JST
大谷です.
再現させることが出来ましたので、
調査を続けてみます.
よろしくお願いします.
07/07/08 に Shinpei Ohtani<[E-MAIL ADDRESS DELETED]> さんは書きました:
> 大谷です.
>
> すいません、別の検証用アプリと勘違いしていました.
> 先ほどのメールは訂正させてください.
> 再度現象を再現させるように試して見ます.
> よろしくお願いします.
>
> 07/07/08 に Shinpei Ohtani<[E-MAIL ADDRESS DELETED]> さんは書きました:
> > 大谷です.
> >
> > 下記コードありがとうございます.
> > こちらでも再現できましたので、詳しく調べてみることに
> > します.
> > よろしくお願いします.
> >
> > 07/07/08 に takemura<[E-MAIL ADDRESS DELETED]> さんは書きました:
> > > 竹村です
> > >
> > > > 出来ればサンプルのコードなどを提供してもらえると幸いです
> > >
> > > 現象が発生する最低限に絞ったソースを添付させて頂きました。
> > >
> > > 自分でもいろいろやってみてエラーになるケースをまとめてみました。
> > >
> > > 1.COOLデプロイだと平気でHOTデプロイだとエラーとなってしまう。
> > > 2.validatorメソッド内でdaoを実行する前にreturnすると平気。そして
> > > daoを実行して(検索系)戻り値がnullの場合は平気。戻り値があって
> > > validateをスルーすると(エラーとしない)次のPageのdoメソッド内で
> > > daoを実行したときにエラーとなってしまいます。
> > >
> > > 前回とは違って今度はClassCastExceptionが発生してしまいました
> > >
> > >
> > > 以下スタックトレースです。
> > >
> > > DEBUG 2007-07-08 23:07:40,921 [http-8080-Processor22] BEGIN
> > > jp.co.hoge.app1.dao.EmpDao#selectById(1)
> > > DEBUG 2007-07-08 23:07:40,921 [http-8080-Processor22] SELECT Emp.id,
> > > Emp.DEPT_ID, Emp.EMP_NAME, Emp.EMP_NO, Emp.hiredate, Emp.MGR_ID,
> > > Emp.sal, Emp.VERSION_NO, dept.id AS id_0, dept.DEPT_NAME AS DEPT_NAME_0,
> > > dept.DEPT_NO AS DEPT_NO_0, dept.loc AS loc_0, dept.VERSION_NO AS
> > > VERSION_NO_0 FROM Emp LEFT OUTER JOIN Dept dept ON Emp.DEPT_ID = dept.ID
> > > WHERE Emp.ID = 1
> > > DEBUG 2007-07-08 23:07:40,937 [http-8080-Processor22] END
> > > jp.co.hoge.app1.dao.EmpDao#selectById(1) :
> > > [E-MAIL ADDRESS DELETED]
> > > DEBUG 2007-07-08 23:07:43,281 [http-8080-Processor22] トランザクションを
> > > ロールバックしました
> > > java.lang.ClassCastException: jp.co.hoge.app1.entity.Emp
> > > at
> > > jp.co.hoge.app1.dao.EmpDao$$EnhancedByS2AOP$$1479784.selectById(EmpDao$$EnhancedByS2AOP$$1479784.java)
> > > at jp.co.hoge.app1.web.search.EmpUpdatePage.doUpdate(EmpUpdatePage.java:18)
> > > at
> > > jp.co.hoge.app1.web.search.EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc.$$doUpdate$$invokeSuperMethod$$(EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc.java)
> > > at
> > > jp.co.hoge.app1.web.search.EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc$$MethodInvocation$$doUpdate0.proceed(MethodInvocationClassGenerator.java)
> > > at
> > > org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:48)
> > > at
> > > jp.co.hoge.app1.web.search.EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc$$MethodInvocation$$doUpdate0.proceed(MethodInvocationClassGenerator.java)
> > > at
> > > org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:73)
> > > at
> > > jp.co.hoge.app1.web.search.EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc$$MethodInvocation$$doUpdate0.proceed(MethodInvocationClassGenerator.java)
> > > at
> > > org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:70)
> > > at
> > > jp.co.hoge.app1.web.search.EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc$$MethodInvocation$$doUpdate0.proceed(MethodInvocationClassGenerator.java)
> > > at
> > > jp.co.hoge.app1.web.search.EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc.doUpdate(EmpUpdatePage$$EnhancedByS2AOP$$1c1c9dc.java)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > at org.seasar.framework.util.MethodUtil.invoke(MethodUtil.java:73)
> > > at
> > > org.seasar.framework.beans.impl.BeanDescImpl.invoke(BeanDescImpl.java:213)
> > > at
> > > org.seasar.teeda.extension.html.impl.HtmlComponentInvokerImpl.invoke(HtmlComponentInvokerImpl.java:159)
> > > at
> > > org.seasar.teeda.extension.html.impl.HtmlActionListener.processAction(HtmlActionListener.java:62)
> > > at javax.faces.component.UICommand.broadcast(UICommand.java:149)
> > > at
> > > org.seasar.teeda.extension.component.html.THtmlCommandButton.broadcast(THtmlCommandButton.java:53)
> > > at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:192)
> > > at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:117)
> > > at
> > > org.seasar.teeda.core.lifecycle.impl.InvokeApplicationPhase.executePhase(InvokeApplicationPhase.java:29)
> > > at
> > > org.seasar.teeda.core.lifecycle.AbstractPhase.execute(AbstractPhase.java:55)
> > > at
> > > org.seasar.teeda.core.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:94)
> > > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:92)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > at
> > > org.seasar.teeda.core.filter.RequestDumpFilter.doFilter(RequestDumpFilter.java:125)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > at
> > > org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:63)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > at
> > > org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:64)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > at
> > > org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:62)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > at
> > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> > > at
> > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> > > at
> > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> > > at
> > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> > > at
> > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> > > at
> > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > > at
> > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > > at
> > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> > > at
> > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > > at
> > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> > > at
> > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> > > at java.lang.Thread.run(Thread.java:595)
> > > DEBUG 2007-07-08 23:07:43,281 [http-8080-Processor22] END
> > > jp.co.hoge.app1.web.search.EmpUpdatePage#doUpdate() : null
> > > DEBUG 2007-07-08 23:07:43,296 [http-8080-Processor22]
> > >
> > > DEBUG 2007-07-08 23:07:43,312 [http-8080-Processor22] HOT deployを終了し
> > > ました
> > >
> > >
> > >
> > >
> > >
> > >
> > > Shinpei Ohtani さんは書きました:
> > > > 大谷です.
> > > >
> > > > 下記時間の都合がつき次第見てみます.
> > > > 出来ればサンプルのコードなどを提供してもらえると幸いです.
> > > > よろしくお願いします.
> > > >
> > > > 07/07/04 に takemura<[E-MAIL ADDRESS DELETED]> さんは書きました:
> > > >> 竹村と申します
> > > >>
> > > >> Teedaでのカスタムバリデータ内のvalidateメソッド内で
> > > >> daoを用いた入力チェックを行っているのですが状況により
> > > >> validateをクリアした次のPage内のdo〜メソッド内で
> > > >>
> > > >> java.lang.IllegalArgumentException: object is not an instance of
> > > >> declaring class
> > > >>
> > > >> が発生してしまいます。
> > > >>
> > > >> しかしエラーが発生するケースが奇妙なのです。
> > > >> validate内は下記のようになっています
> > > >>
> > > >> Emp emp = empDao.selectByEmpNo(empNo);
> > > >>
> > > >> if (emp == null) {
> > > >> Object[] args = new Object[] { value };
> > > >> FacesMessage message = FacesMessageUtil.getMessage(context,
> > > >> MESSAGE_ID, args);
> > > >> throw new ValidatorException(message, MESSAGE_ID, args);
> > > >> }
> > > >>
> > > >> daoで検索してnullだった場合は正常に元の画面にエラーが表示
> > > >> されるのですが empがnullではなくvalidateをスルーして
> > > >> Pageのdo〜メソッドに行って同じempDaoのメソッドを呼ぶと
> > > >> 上記エラーが発生してしまいます。
> > > >> (エラーになるdaoのメソッドはvalidateをかまさないと正常に動作します)
> > > >> ためしにvalidator内に無いdaoをPage内のdo〜メソッドで試したところ
> > > >> 正常に動作しました。
> > > >>
> > > >> まとめるとvalidator内にあるdaoと同じdaoをvalidator検証後Page内の
> > > >> do〜メソッドで呼ぶとエラーになってしまうようです。
> > > >>
> > > >> 仕様バージョン
> > > >> Teeda 1.07
> > > >> S2 2.4.14
> > > >> S2Dao 1.0.44
> > > >>
> > > >> デプロイ:HOT
> > > >> 構成:churaのsmartDeploy構成
> > > >>
> > > >>
> > > >> 以下スタックトレースです
> > > >> DEBUG 2007-07-04 23:14:42,484 [http-8080-Processor25] HOT deployを開始します
> > > >> DEBUG 2007-07-04 23:14:42,484 [http-8080-Processor25]
> > > >>
> > > >> DEBUG 2007-07-04 23:14:42,781 [http-8080-Processor25] クラス
> > > >> (jp.hoge.app1.web.search.EmpSearchPage[search_empSearchPage])のコンポー
> > > >> ネント定義を登録します
> > > >> DEBUG 2007-07-04 23:14:42,875 [http-8080-Processor25] クラス
> > > >> (jp.hoge.app1.dao.DeptDao[deptDao])のコンポーネント定義を登録します
> > > >> DEBUG 2007-07-04 23:14:42,937 [http-8080-Processor25] クラス
> > > >> (jp.hoge.app1.dxo.LabelValueDxo[labelValueDxo])のコンポーネント定義を登
> > > >> 録します
> > > >> DEBUG 2007-07-04 23:14:42,968 [http-8080-Processor25] クラス
> > > >> (jp.hoge.app1.dao.EmpDao[empDao])のコンポーネント定義を登録します
> > > >> DEBUG 2007-07-04 23:15:12,500 [http-8080-Processor25] BEGIN
> > > >> jp.hoge.app1.dao.EmpDao#selectByEmpNo(7369)
> > > >> DEBUG 2007-07-04 23:15:12,734 [http-8080-Processor25] SELECT Emp.id,
> > > >> Emp.DEPT_ID, Emp.EMP_NAME, Emp.EMP_NO, Emp.hiredate, Emp.MGR_ID,
> > > >> Emp.sal, Emp.VERSION_NO, dept.id AS id_0, dept.DEPT_NAME AS DEPT_NAME_0,
> > > >> dept.DEPT_NO AS DEPT_NO_0, dept.loc AS loc_0, dept.VERSION_NO AS
> > > >> VERSION_NO_0 FROM Emp LEFT OUTER JOIN Dept dept ON Emp.DEPT_ID = dept.ID
> > > >> WHERE Emp.EMP_NO = 7369
> > > >> DEBUG 2007-07-04 23:15:12,750 [http-8080-Processor25] END
> > > >> jp.hoge.app1.dao.EmpDao#selectByEmpNo(7369) : [E-MAIL ADDRESS DELETED]
> > > >> DEBUG 2007-07-04 23:15:12,750 [http-8080-Processor25] BEGIN
> > > >> jp.hoge.app1.web.search.EmpSearchPage#doSearch()
> > > >> DEBUG 2007-07-04 23:15:12,750 [http-8080-Processor25] トランザクションを
> > > >> 開始しました
> > > >> DEBUG 2007-07-04 23:15:14,468 [http-8080-Processor25] BEGIN
> > > >> jp.hoge.app1.dao.EmpDao#searchEmp(jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$[E-MAIL ADDRESS DELETED])
> > > >> DEBUG 2007-07-04 23:15:14,484 [http-8080-Processor25] END
> > > >> jp.hoge.app1.dao.EmpDao#searchEmp(jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$[E-MAIL ADDRESS DELETED])
> > > >> Throwable:java.lang.IllegalArgumentException: object is not an instance
> > > >> of declaring class
> > > >> DEBUG 2007-07-04 23:15:14,484 [http-8080-Processor25] トランザクションを
> > > >> ロールバックしました
> > > >> java.lang.IllegalArgumentException: object is not an instance of
> > > >> declaring class
> > > >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >> at
> > > >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > >> at
> > > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > >> at java.lang.reflect.Method.invoke(Method.java:585)
> > > >> at org.seasar.framework.util.MethodUtil.invoke(MethodUtil.java:73)
> > > >> at
> > > >> org.seasar.framework.beans.impl.PropertyDescImpl.getValue(PropertyDescImpl.java:188)
> > > >> at org.seasar.dao.node.BindVariableNode.accept(BindVariableNode.java:59)
> > > >> at org.seasar.dao.node.ContainerNode.accept(ContainerNode.java:34)
> > > >> at org.seasar.dao.node.IfNode.accept(IfNode.java:58)
> > > >> at org.seasar.dao.node.ContainerNode.accept(ContainerNode.java:34)
> > > >> at
> > > >> org.seasar.dao.impl.AbstractDynamicCommand.apply(AbstractDynamicCommand.java:66)
> > > >> at
> > > >> org.seasar.dao.impl.SelectDynamicCommand.execute(SelectDynamicCommand.java:50)
> > > >> at
> > > >> org.seasar.dao.interceptors.S2DaoInterceptor.invoke(S2DaoInterceptor.java:53)
> > > >> at
> > > >> org.seasar.dao.pager.PagerS2DaoInterceptorWrapper.invoke(PagerS2DaoInterceptorWrapper.java:71)
> > > >> at
> > > >> jp.hoge.app1.dao.EmpDao$$EnhancedByS2AOP$$100fa88$$MethodInvocation$$searchEmp4.proceed(MethodInvocationClassGenerator.java)
> > > >> at
> > > >> org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:70)
> > > >> at
> > > >> jp.hoge.app1.dao.EmpDao$$EnhancedByS2AOP$$100fa88$$MethodInvocation$$searchEmp4.proceed(MethodInvocationClassGenerator.java)
> > > >> at
> > > >> jp.hoge.app1.dao.EmpDao$$EnhancedByS2AOP$$100fa88.searchEmp(EmpDao$$EnhancedByS2AOP$$100fa88.java)
> > > >> at jp.hoge.app1.web.search.EmpSearchPage.doSearch(EmpSearchPage.java:115)
> > > >> at
> > > >> jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$68a881.$$doSearch$$invokeSuperMethod$$(EmpSearchPage$$EnhancedByS2AOP$$68a881.java)
> > > >> at
> > > >> jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$68a881$$MethodInvocation$$doSearch2.proceed(MethodInvocationClassGenerator.java)
> > > >> at
> > > >> org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:48)
> > > >> at
> > > >> jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$68a881$$MethodInvocation$$doSearch2.proceed(MethodInvocationClassGenerator.java)
> > > >> at
> > > >> org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:73)
> > > >> at
> > > >> jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$68a881$$MethodInvocation$$doSearch2.proceed(MethodInvocationClassGenerator.java)
> > > >> at
> > > >> org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:70)
> > > >> at
> > > >> jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$68a881$$MethodInvocation$$doSearch2.proceed(MethodInvocationClassGenerator.java)
> > > >> at
> > > >> jp.hoge.app1.web.search.EmpSearchPage$$EnhancedByS2AOP$$68a881.doSearch(EmpSearchPage$$EnhancedByS2AOP$$68a881.java)
> > > >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >> at
> > > >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > >> at
> > > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > >> at java.lang.reflect.Method.invoke(Method.java:585)
> > > >> at org.seasar.framework.util.MethodUtil.invoke(MethodUtil.java:73)
> > > >> at
> > > >> org.seasar.framework.beans.impl.BeanDescImpl.invoke(BeanDescImpl.java:213)
> > > >> at
> > > >> org.seasar.teeda.extension.html.impl.HtmlComponentInvokerImpl.invoke(HtmlComponentInvokerImpl.java:159)
> > > >> at
> > > >> org.seasar.teeda.extension.html.impl.HtmlActionListener.processAction(HtmlActionListener.java:62)
> > > >> at javax.faces.component.UICommand.broadcast(UICommand.java:149)
> > > >> at
> > > >> org.seasar.teeda.extension.component.html.THtmlCommandButton.broadcast(THtmlCommandButton.java:53)
> > > >> at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:192)
> > > >> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:117)
> > > >> at
> > > >> org.seasar.teeda.core.lifecycle.impl.InvokeApplicationPhase.executePhase(InvokeApplicationPhase.java:29)
> > > >> at
> > > >> org.seasar.teeda.core.lifecycle.AbstractPhase.execute(AbstractPhase.java:55)
> > > >> at
> > > >> org.seasar.teeda.core.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:94)
> > > >> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:92)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >> at
> > > >> org.seasar.teeda.core.filter.RequestDumpFilter.doFilter(RequestDumpFilter.java:125)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >> at
> > > >> org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:63)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >> at
> > > >> org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:64)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >> at
> > > >> org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:62)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > >> at
> > > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >> at
> > > >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> > > >> at
> > > >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> > > >> at
> > > >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> > > >> at
> > > >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> > > >> at
> > > >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> > > >> at
> > > >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > > >> at
> > > >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > > >> at
> > > >> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> > > >> at
> > > >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > > >> at
> > > >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> > > >> at
> > > >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> > > >> at java.lang.Thread.run(Thread.java:595)
> > > >> DEBUG 2007-07-04 23:15:14,484 [http-8080-Processor25] END
> > > >> jp.hoge.app1.web.search.EmpSearchPage#doSearch() : null
> > > >> DEBUG 2007-07-04 23:15:14,484 [http-8080-Processor25] BEGIN
> > > >> jp.hoge.app1.web.search.EmpSearchPage#prerender()
> > > >> DEBUG 2007-07-04 23:15:14,484 [http-8080-Processor25] トランザクションを
> > > >> 開始しました
> > > >> DEBUG 2007-07-04 23:15:14,500 [http-8080-Processor25] クラス
> > > >> (jp.hoge.app1.dto.UserDto[userDto])のコンポーネント定義を登録します
> > > >> DEBUG 2007-07-04 23:15:14,500 [http-8080-Processor25] BEGIN
> > > >> jp.hoge.app1.dao.DeptDao#selectAll()
> > > >> DEBUG 2007-07-04 23:15:14,515 [http-8080-Processor25] SELECT Dept.id,
> > > >> Dept.DEPT_NAME, Dept.DEPT_NO, Dept.loc, Dept.VERSION_NO FROM Dept
> > > >> DEBUG 2007-07-04 23:15:14,515 [http-8080-Processor25] END
> > > >> jp.hoge.app1.dao.DeptDao#selectAll() :
> > > >> [[E-MAIL ADDRESS DELETED], [E-MAIL ADDRESS DELETED],
> > > >> [E-MAIL ADDRESS DELETED], [E-MAIL ADDRESS DELETED]]
> > > >> DEBUG 2007-07-04 23:15:14,515 [http-8080-Processor25] BEGIN
> > > >> jp.hoge.app1.dxo.LabelValueDxo#deptToMap([[E-MAIL ADDRESS DELETED],
> > > >> [E-MAIL ADDRESS DELETED], [E-MAIL ADDRESS DELETED],
> > > >> [E-MAIL ADDRESS DELETED]])
> > > >> DEBUG 2007-07-04 23:15:14,578 [http-8080-Processor25] END
> > > >> jp.hoge.app1.dxo.LabelValueDxo#deptToMap([[E-MAIL ADDRESS DELETED],
> > > >> [E-MAIL ADDRESS DELETED], [E-MAIL ADDRESS DELETED],
> > > >> [E-MAIL ADDRESS DELETED]]) : [{label=ACCOUNTING, value=1},
> > > >> {label=RESEARCH, value=2}, {label=SALES, value=3}, {label=OPERATIONS,
> > > >> value=4}]
> > > >> DEBUG 2007-07-04 23:15:14,578 [http-8080-Processor25] トランザクションを
> > > >> コミットしました
> > > >> DEBUG 2007-07-04 23:15:14,578 [http-8080-Processor25] END
> > > >> jp.hoge.app1.web.search.EmpSearchPage#prerender() : null
> > > >> DEBUG 2007-07-04 23:15:14,609 [http-8080-Processor25] クラス
> > > >> (jp.hoge.app1.web.layout.Layout2Page[layout_layout2Page])のコンポーネン
> > > >> ト定義を登録します
> > > >> DEBUG 2007-07-04 23:15:14,640 [http-8080-Processor25] BEGIN
> > > >> jp.hoge.app1.web.layout.Layout2Page#prerender()
> > > >> DEBUG 2007-07-04 23:15:14,640 [http-8080-Processor25] トランザクションを
> > > >> 開始しました
> > > >> DEBUG 2007-07-04 23:15:14,640 [http-8080-Processor25] トランザクションを
> > > >> コミットしました
> > > >> DEBUG 2007-07-04 23:15:14,640 [http-8080-Processor25] END
> > > >> jp.hoge.app1.web.layout.Layout2Page#prerender() : null
> > > >> DEBUG 2007-07-04 23:15:14,671 [http-8080-Processor25]
> > > >>
> > > >>
> > > >> DEBUG 2007-07-04 23:15:14,671 [http-8080-Processor25] HOT deployを終了し
> > > >> ました
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> _______________________________________________
> > > >> Seasar-user mailing list
> > > >> [E-MAIL ADDRESS DELETED]
> > > >> https://ml.seasar.org/mailman/listinfo/seasar-user
> > > >>
> > > >
> > > >
> > >
> > > package jp.co.hoge.app1.web.search;
> > >
> > > import jp.co.hoge.app1.dao.EmpDao;
> > > import jp.co.hoge.app1.entity.Emp;
> > >
> > > public class EmpUpdatePage {
> > >
> > >
> > > private EmpDao empDao;
> > >
> > > public static final String empId_empValidator=null;
> > > private Integer empId;
> > >
> > >
> > > public Class doUpdate(){
> > >
> > >
> > > Emp emp = empDao.selectById(empId);
> > > empDao.update(emp);
> > >
> > >
> > > return null;
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > public Integer getEmpId() {
> > > return empId;
> > > }
> > >
> > > public void setEmpId(Integer empId) {
> > > this.empId = empId;
> > > }
> > >
> > > public EmpDao getEmpDao() {
> > > return empDao;
> > > }
> > >
> > > public void setEmpDao(EmpDao empDao) {
> > > this.empDao = empDao;
> > > }
> > >
> > > }
> > >
> > > package jp.co.hoge.app1.validator;
> > >
> > > import javax.faces.FacesException;
> > > import javax.faces.application.FacesMessage;
> > > import javax.faces.component.StateHolder;
> > > import javax.faces.component.UIComponent;
> > > import javax.faces.context.FacesContext;
> > > import javax.faces.internal.FacesMessageUtil;
> > > import javax.faces.validator.Validator;
> > > import javax.faces.validator.ValidatorException;
> > >
> > > import jp.co.hoge.app1.dao.EmpDao;
> > > import jp.co.hoge.app1.entity.Emp;
> > >
> > > /**
> > > * 従業員IDチェックバリデータ
> > > *
> > > */
> > > public class EmpValidator implements StateHolder, Validator {
> > >
> > > private static final String MESSAGE_ID = "jp.co.hoge.validator.emp";
> > >
> > > private boolean transientValue = false;
> > >
> > > private EmpDao empDao;
> > >
> > >
> > > /**
> > > * バリデート実装
> > > *
> > > */
> > > public void validate(FacesContext context, UIComponent component,
> > > Object value) throws FacesException {
> > >
> > >
> > > if(value==null){
> > > return;
> > > }
> > >
> > > Emp emp = empDao.selectById((Integer)value);
> > >
> > > if (emp == null) {
> > > Object[] args = new Object[] { value };
> > > FacesMessage message = FacesMessageUtil.getMessage(context,
> > > MESSAGE_ID, args);
> > >
> > > throw new ValidatorException(message, MESSAGE_ID, args);
> > > }
> > >
> > > return;
> > > }
> > >
> > >
> > >
> > >
> > > public boolean isTransient() {
> > > return transientValue;
> > > }
> > >
> > > public void restoreState(FacesContext context, Object state) {
> > > }
> > >
> > > public Object saveState(FacesContext context) {
> > > return null;
> > > }
> > >
> > > public void setTransient(boolean transientValue) {
> > > this.transientValue = transientValue;
> > > }
> > >
> > > public void setEmpDao(EmpDao empDao) {
> > > this.empDao = empDao;
> > > }
> > >
> > > }
> > >
> > > _______________________________________________
> > > Seasar-user mailing list
> > > [E-MAIL ADDRESS DELETED]
> > > https://ml.seasar.org/mailman/listinfo/seasar-user
> > >
> > >
> >
> >
> > --
> > =============================
> > Shinpei Ohtani
> > [E-MAIL ADDRESS DELETED]
> > =============================
> >
>
>
> --
> =============================
> Shinpei Ohtani
> [E-MAIL ADDRESS DELETED]
> =============================
>
--
=============================
Shinpei Ohtani
[E-MAIL ADDRESS DELETED]
=============================
Seasar-user メーリングリストの案内