[Seasar-user:5625] Re: S2PagerとFOR UPDATEの併用について
山中孝太
[E-MAIL ADDRESS DELETED]
2006年 12月 27日 (水) 13:27:40 JST
返信遅くなりまして申し訳ありません。
やまなかです。
RDBはDB2、JDBCドライバはType4(com.ibm.db2.jcc.DB2Driver)を使用しております。
DefaultPagerConditionを使用し、かつFOR UPDATEを使用した場合に出るエラーの
スタックトレースは下記になります。
(0) [ESSR0071]SQLで例外(ErrorCode=-228, SQLState=42620)が発生しました。
理由はorg.seasar.framework.exception.SSQLException:
[ESSR0072]SQLで例外(SQL=[select aaa,bbb from xx where aaa = ? for update
with rs], Error
org.seasar.framework.exception.SQLRuntimeException:
[ESSR0071]SQLで例外(ErrorCode=-228, SQLState=42620)が発生しました。
理由はorg.seasar.framework.exception.SSQLException:
[ESSR0072]SQLで例外(SQL=[select
aaa,
bbb
from
xx
where
ship_aaa = ?
for update with rs], ErrorCode=-228, SQLState=42620)が発生しました
at org.seasar.framework.util.PreparedStatementUtil.executeQuery(
PreparedStatementUtil.java:37)
at org.seasar.extension.jdbc.impl.BasicResultSetFactory.createResultSet
(BasicResultSetFactory.java:36)
at org.seasar.dao.pager.PagerResultSetFactoryWrapper.createResultSet(
PagerResultSetFactoryWrapper.java:63)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.createResultSet(
BasicSelectHandler.java:173)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:162)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:135)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:120)
at org.seasar.dao.impl.SelectDynamicCommand.execute(
SelectDynamicCommand.java:55)
at org.seasar.dao.interceptors.S2DaoInterceptor.invoke(
S2DaoInterceptor.java:53)
at org.seasar.dao.pager.PagerS2DaoInterceptorWrapper.invoke(
PagerS2DaoInterceptorWrapper.java:64)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:43)
at org.seasar.framework.aop.interceptors.InterceptorChain.invoke(
InterceptorChain.java:42)
at
jp.co.hoge.dao.XXDao$$EnhancedByS2AOP$$c1758fd$$MethodInvocation$$findXX2.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
at jp.co.hoge.dao.XXDao$$EnhancedByS2AOP$$c1758fd.findXX(
Ljp.co.hoge.domain.XX
;)Ljp.co.hoge.domain.XX;(XXDao$$EnhancedByS2AOP$$c1758fd.java:???)
at jp.co.hoge.service.XXServiceImpl.serchXX(XXServiceImpl.java:319)
at
jp.co.hoge.service.XXServiceImpl$$EnhancedByS2AOP$$c1eb4c4.serchXX$$invokeSuperMethod$$
(Ljp.co.hoge.dto.XXDto
;)Ljp.co.hoge.dto.XXDto;(XXServiceImpl$$EnhancedByS2AOP$$c1eb4c4.java:???)
at
jp.co.hoge.service.XXServiceImpl$$EnhancedByS2AOP$$c1eb4c4$$MethodInvocation$$serchXX0.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:45)
at jp.co.hoge.aop.XXBeforeAdvice.invoke(XXBeforeAdvice.java:82)
at
jp.co.hoge.aop.XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f.invoke$$invokeSuperMethod$$
(Lorg.aopalliance.intercept.MethodInvocation
;)Ljava.lang.Object;(XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f.java:???)
at
jp.co.hoge.aop.XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f$$MethodInvocation$$invoke0.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
at
org.seasar.framework.aop.interceptors.InterceptorLifecycleAdapter.invoke(
InterceptorLifecycleAdapter.java:45)
at
jp.co.hoge.aop.XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f$$MethodInvocation$$invoke0.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
at jp.co.hoge.aop.XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f.invoke(
Lorg.aopalliance.intercept.MethodInvocation
;)Ljava.lang.Object;(XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f.java:???)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:43)
at org.seasar.extension.tx.RequiredInterceptor.invoke(
RequiredInterceptor.java:40)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:43)
at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(
TraceInterceptor.java:50)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:43)
at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(
TraceInterceptor.java:50)
Caused by: org.seasar.framework.exception.SSQLException:
[ESSR0072]SQLで例外(SQL=[select
aaa,
bbb
from
xx
where
aaa = ?
for update with rs], ErrorCode=-228, SQLState=42620)が発生しました
at
org.seasar.extension.jdbc.impl.PreparedStatementWrapper.wrapException(
PreparedStatementWrapper.java:62)
at
org.seasar.extension.jdbc.impl.PreparedStatementWrapper.wrapException(
PreparedStatementWrapper.java:57)
at org.seasar.extension.jdbc.impl.PreparedStatementWrapper.executeQuery
(PreparedStatementWrapper.java:73)
at org.seasar.framework.util.PreparedStatementUtil.executeQuery(
PreparedStatementUtil.java:35)
at org.seasar.extension.jdbc.impl.BasicResultSetFactory.createResultSet
(BasicResultSetFactory.java:36)
at org.seasar.dao.pager.PagerResultSetFactoryWrapper.createResultSet(
PagerResultSetFactoryWrapper.java:63)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.createResultSet(
BasicSelectHandler.java:173)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:162)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:135)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:120)
at org.seasar.dao.impl.SelectDynamicCommand.execute(
SelectDynamicCommand.java:55)
at org.seasar.dao.interceptors.S2DaoInterceptor.invoke(
S2DaoInterceptor.java:53)
at org.seasar.dao.pager.PagerS2DaoInterceptorWrapper.invoke(
PagerS2DaoInterceptorWrapper.java:64)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:43)
at org.seasar.framework.aop.interceptors.InterceptorChain.invoke(
InterceptorChain.java:42)
at
jp.co.hoge.dao.XXDao$$EnhancedByS2AOP$$c1758fd$$MethodInvocation$$findXX2.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
at jp.co.hoge.dao.XXDao$$EnhancedByS2AOP$$c1758fd.findXX(
Ljp.co.hoge.domain.XX
;)Ljp.co.hoge.domain.XX;(XXDao$$EnhancedByS2AOP$$c1758fd.java:???)
at jp.co.hoge.service.XXServiceImpl.serchXX(XXServiceImpl.java:319)
at
jp.co.hoge.service.XXServiceImpl$$EnhancedByS2AOP$$c1eb4c4.serchXX$$invokeSuperMethod$$
(Ljp.co.hoge.dto.XXDto
;)Ljp.co.hoge.dto.XXDto;(XXServiceImpl$$EnhancedByS2AOP$$c1eb4c4.java:???)
at
jp.co.hoge.service.XXServiceImpl$$EnhancedByS2AOP$$c1eb4c4$$MethodInvocation$$serchXX0.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:45)
at jp.co.hoge.aop.XXBeforeAdvice.invoke(XXBeforeAdvice.java:82)
at
jp.co.hoge.aop.XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f.invoke$$invokeSuperMethod$$
(Lorg.aopalliance.intercept.MethodInvocation
;)Ljava.lang.Object;(XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f.java:???)
at
jp.co.hoge.aop.XXBeforeAdvice$$EnhancedByS2AOP$$c13b81f$$MethodInvocation$$invoke0.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
Caused by: com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -228,
SQLSTATE: 42620, SQLERRMC: SQL_CURSH200C1
at com.ibm.db2.jcc.b.sf.e(sf.java:1680)
at com.ibm.db2.jcc.b.sf.a(sf.java:1239)
at com.ibm.db2.jcc.c.jb.h(jb.java:139)
at com.ibm.db2.jcc.c.jb.a(jb.java:43)
at com.ibm.db2.jcc.c.w.a(w.java:30)
at com.ibm.db2.jcc.c.cc.g(cc.java:161)
at com.ibm.db2.jcc.b.sf.n(sf.java:1219)
at com.ibm.db2.jcc.b.tf.gb(tf.java:1818)
at com.ibm.db2.jcc.b.tf.d(tf.java:2294)
at com.ibm.db2.jcc.b.tf.X(tf.java:508)
at com.ibm.db2.jcc.b.tf.executeQuery(tf.java:491)
at org.seasar.extension.jdbc.impl.PreparedStatementWrapper.executeQuery
(PreparedStatementWrapper.java:71)
at org.seasar.framework.util.PreparedStatementUtil.executeQuery(
PreparedStatementUtil.java:35)
at org.seasar.extension.jdbc.impl.BasicResultSetFactory.createResultSet
(BasicResultSetFactory.java:36)
at org.seasar.dao.pager.PagerResultSetFactoryWrapper.createResultSet(
PagerResultSetFactoryWrapper.java:63)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.createResultSet(
BasicSelectHandler.java:173)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:162)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:135)
at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(
BasicSelectHandler.java:120)
at org.seasar.dao.impl.SelectDynamicCommand.execute(
SelectDynamicCommand.java:55)
at org.seasar.dao.interceptors.S2DaoInterceptor.invoke(
S2DaoInterceptor.java:53)
at org.seasar.dao.pager.PagerS2DaoInterceptorWrapper.invoke(
PagerS2DaoInterceptorWrapper.java:64)
at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(
NestedMethodInvocation.java:43)
at org.seasar.framework.aop.interceptors.InterceptorChain.invoke(
InterceptorChain.java:42)
at
jp.co.hoge.dao.XXDao$$EnhancedByS2AOP$$c1758fd$$MethodInvocation$$findXX2.proceed
()Ljava.lang.Object;(MethodInvocationClassGenerator.java:???)
at jp.co.hoge.dao.XXDao$$EnhancedByS2AOP$$c1758fd.findXX(
Ljp.co.hoge.domain.XX
;)Ljp.co.hoge.domain.XX;(XXDao$$EnhancedByS2AOP$$c1758fd.java:???)
>PagerConditionのプロパティlimitが-1の場合はPagerを使用しないように修正したいと
>思います。(TYPE_SCROLL_INSENSITIVEとCONCUR_READ_ONLYを使用しないようにします。)
この対応を入れていただければS2PagerとFOR UPDATEの併用が可能となると思います。
よろしくお願い致します。
06/12/26 に Seto Azusa <[E-MAIL ADDRESS DELETED]> さんは書きました:
>
> せとあずさです。
>
> On Mon, 25 Dec 2006 19:59:29 +0900
> Seto Azusa <[E-MAIL ADDRESS DELETED]> wrote:
>
> > S2Dao1.0.38以前は、S2Pager使用時にFOR UPDATEを含むSQL文で例外が発生する問題が
> > あったのですが、1.0.39で対応しています。[DAO-42]
> > # PagerConditionのプロパティlimitを-1(デフォルト)にする必要があります。
>
> すみません、早とちりしてましたm(__)m
> PagerConditionのプロパティlimitが-1の場合はPagerを使用しないように修正したいと
> 思います。(TYPE_SCROLL_INSENSITIVEとCONCUR_READ_ONLYを使用しないようにします。)
>
> ついては、認識に違いがないか確認したいので、スタックトレースだけで結構ですので
> 送ってくださらないでしょうか?
>
>
> --
> せとあずさ
> [E-MAIL ADDRESS DELETED]
> http://www.fieldnotes.jp/d/
>
> _______________________________________________
> 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/20061227/e04f23fc/attachment.html
Seasar-user メーリングリストの案内