[seasar-dev:658] Fw: [JIRA] Updated: (CONTAINER-31) 【S2JDBC】SQLコメント中の?があるとjava.lang.ArrayIndexOutOfBoundsExceptionが起こることがある

SETO Azusa [E-MAIL ADDRESS DELETED]
2007年 3月 20日 (火) 19:50:09 JST


せとあずさです。

本件、どのような扱いになっているでしょうか?
対応できないなら、S2DaoはBasicHandler#getCompleteSqlを使うのをやめます。


Begin forwarded message:

Date: Mon, 5 Mar 2007 12:15:22 +0900 (JST)
From: The Seasar Foundation Issues <[E-MAIL ADDRESS DELETED]>
To: [E-MAIL ADDRESS DELETED]
Subject: [JIRA] Updated: (CONTAINER-31) 【S2JDBC】SQLコメント中の?があるとjava.lang.ArrayIndexOutOfBoundsExceptionが起こることがある



     [ https://www.seasar.org/issues/browse/CONTAINER-31?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

azusa updated CONTAINER-31:
---------------------------

    Attachment: seasar2.patch

当座しのぎですが、ArrayIndexOutOfBoundsExceptionが発生する条件下では
PreparedStatementをそのまま出力するようにしてみました。

> 【S2JDBC】SQLコメント中の?があるとjava.lang.ArrayIndexOutOfBoundsExceptionが起こることがある
> -----------------------------------------------------------------------
>
>                 Key: CONTAINER-31
>                 URL: https://www.seasar.org/issues/browse/CONTAINER-31
>             Project: S2Container
>          Issue Type: Bug
>          Components: S2Container
>    Affects Versions: 2.3.16, 2.4.8
>            Reporter: azusa
>         Assigned To: higa
>         Attachments: seasar2.patch
>
>
> DAO-72で報告された件なのですが、例外の発生箇所がS2Containerなのでこちらに振ります。
> S2Daoのorg.seasar.dao.impl.DefaultTest#InsertByManualSql2Txをテストケースとして実行すると、以下の例外が発生します。
> java.lang.ArrayIndexOutOfBoundsException: 1
> 	at org.seasar.extension.jdbc.impl.BasicHandler.getCompleteSql(BasicHandler.java:148)
> 	at org.seasar.extension.jdbc.impl.BasicUpdateHandler.execute(BasicUpdateHandler.java:62)
> 	at org.seasar.dao.impl.UpdateDynamicCommand.execute(UpdateDynamicCommand.java:43)
> 	at org.seasar.dao.interceptors.S2DaoInterceptor.invoke(S2DaoInterceptor.java:53)
> 	at org.seasar.dao.pager.PagerS2DaoInterceptorWrapper.invoke(PagerS2DaoInterceptorWrapper.java:64)
> 	at org.seasar.dao.impl.DefaultTest$DefaultTableDao$$EnhancedByS2AOP$$f6438d$$MethodInvocation$$insertBySql23.proceed(MethodInvocationClassGenerator.java)
> 	at org.seasar.dao.impl.DefaultTest$DefaultTableDao$$EnhancedByS2AOP$$f6438d.insertBySql2(DefaultTest$DefaultTableDao$$EnhancedByS2AOP$$f6438d.java)
> 	at org.seasar.dao.impl.DefaultTest.testInsertByManualSql2Tx(DefaultTest.java:273)
> 	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 junit.framework.TestCase.runTest(TestCase.java:164)
> 	at org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.java:305)
> 	at org.seasar.extension.unit.S2TestCase.doRunTest(S2TestCase.java:92)
> 	at org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:190)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> SQLコメント中の「?」をBasicHandler#getCompleteSqlで削除できないでしょうか?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://www.seasar.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       





-- 
せとあずさ
[E-MAIL ADDRESS DELETED]
http://www.fieldnotes.jp/d/



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