[Seasar-user:1689] S2DAO ERROR

Masanobu Shimura mikeshimura
2005年 3月 28日 (月) 10:28:20 JST


ひがさま

原因不明のERRORが発生しましたのでお知らせします。

SQL FILEは下記の様になっています。

------------------------------
select TOP 
/*IF dto.max != null*/ /*dto.max*/ /*END*/
* from tmp_shi_InterChg
where 
/*IF dto.searchPn != null*/FindPartNo LIKE /*dto.searchPn*//*END*/
/*IF dto.level == 0*/and AuthStatus > ' ' /* *//*END*/
order by FindPartNo, FindMfr

--------------------

この2行目を 数字の20でしたら問題ないのですが、

/*IF dto.max != null*/ /*dto.max*/ /*END*/
にすると下記 ERRORが発生してしまいます。

なおDBは SQLSERVER です。
どの様に Traceすればより原因がわかるかアドバイスが出来れば
お願いします。
とりあえず定数にて対応しますので、特に急ぎません。

志村

DEBUG 2005-03-28 10:20:49,160 [http-8080-Processor23] BEGIN
shimura.sap.dao.InterChgDao#searchPnList([E-MAIL ADDRESS DELETED])
DEBUG 2005-03-28 10:20:49,911 [http-8080-Processor23] 物理的なコネクショ
ンを取得しました
DEBUG 2005-03-28 10:20:49,911 [http-8080-Processor23] 論理的なコネクショ
ンを取得しました
DEBUG 2005-03-28 10:20:50,322 [http-8080-Processor23] 論理的なコネクショ
ンを閉じました
DEBUG 2005-03-28 10:20:50,702 [http-8080-Processor23] 
select TOP 
 20 
* from tmp_shi_InterChg
where 
FindPartNo LIKE 'NAS1611-4%'
and AuthStatus > ' ' 
order by FindPartNo, FindMfr
DEBUG 2005-03-28 10:20:50,702 [http-8080-Processor23] 論理的なコネクショ
ンを取得しました
DEBUG 2005-03-28 10:20:50,732 [http-8080-Processor23] 論理的なコネクショ
ンを閉じました
DEBUG 2005-03-28 10:20:50,742 [http-8080-Processor23] END
shimura.sap.dao.InterChgDao#searchPnList([E-MAIL ADDRESS DELETED])
Throwable:org.seasar.framework.exception.SQLRuntimeException: [ESSR0071]SQL
で例外が発生しました。理由はjava.sql.SQLException: 行 3: '@P0' の近くに無
効な構文があります。
2005-03-28 10:20:50,752 [http-8080-Processor23] ERROR
org.apache.myfaces.el.MethodBindingImpl - Exception while invoking
expression #{inqAction.search}
org.seasar.framework.exception.SQLRuntimeException: [ESSR0071]SQLで例外が
発生しました。理由はjava.sql.SQLException: 行 3: '@P0' の近くに無効な構文
があります。
	at
org.seasar.framework.util.PreparedStatementUtil.executeQuery(PreparedStatementUtil.java:22)
	at
org.seasar.extension.jdbc.impl.BasicResultSetFactory.createResultSet(BasicResultSetFactory.java:21)
	at
org.seasar.extension.jdbc.impl.BasicSelectHandler.createResultSet(BasicSelectHandler.java:160)
	at
org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(BasicSelectHandler.java:149)
	at
org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(BasicSelectHandler.java:122)
	at
org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(BasicSelectHandler.java:107)
	at
org.seasar.dao.impl.SelectDynamicCommand.execute(SelectDynamicCommand.java:40)
	at
org.seasar.dao.interceptors.S2DaoInterceptor.invoke(S2DaoInterceptor.java:38)
	at
$$shimura.sap.dao.InterChgDao$$EnhancedByS2AOP$$12f8a84$$MethodInvocation$$searchPnList0.proceed(MethodInvocationClassGenerator.java)
	at
org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:33)
	at
$$shimura.sap.dao.InterChgDao$$EnhancedByS2AOP$$12f8a84$$MethodInvocation$$searchPnList0.proceed(MethodInvocationClassGenerator.java)
	at
$$shimura.sap.dao.InterChgDao$$EnhancedByS2AOP$$12f8a84.searchPnList(InterChgDao$$EnhancedByS2AOP$$12f8a84.java)
	at shimura.sap.logic.impl.InqLogicImpl.search(InqLogicImpl.java:46)
	at shimura.sap.action.impl.InqActionImpl.search(InqActionImpl.java:38)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:138)
	at org.seasar.jsf.util.InvokeUtil.invokeInternal(InvokeUtil.java:67)
	at org.seasar.jsf.util.InvokeUtil.invoke(InvokeUtil.java:46)
	at
org.seasar.jsf.application.ActionListenerImpl.processAction(ActionListenerImpl.java:46)
	at javax.faces.component.UICommand.broadcast(UICommand.java:106)
	at
org.seasar.jsf.component.S2UIViewRoot.broadcastForPhase(S2UIViewRoot.java:104)
	at
org.seasar.jsf.component.S2UIViewRoot.processApplication(S2UIViewRoot.java:75)
	at
org.seasar.jsf.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:149)
	at org.seasar.jsf.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:82)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:119)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at
org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:47)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at
org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:45)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Unknown Source)



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