Uploaded image for project: 'S2Container'
  1. S2Container
  2. CONTAINER-31

【S2JDBC】SQLコメント中の?があるとjava.lang.ArrayIndexOutOfBoundsExceptionが起こることがある

XMLWordPrintable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major Major
    • 2.3.19, 2.4.12
    • Affects Version/s: 2.3.16, 2.4.8
    • Component/s: S2Container
    • None

      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で削除できないでしょうか?

            Assignee:
            koichik koichik
            Reporter:
            azusa azusa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: