Uploaded image for project: 'S2Dao'
  1. S2Dao
  2. DAO-39

UnlessNullで更新したときにPK以外が全てnullだとSQLRuntimeExceptionが発生する。

XMLWordPrintable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor Minor
    • 1.0.38
    • Affects Version/s: None
    • Component/s: s2dao
    • None

      そんな使い方する方が悪いのかもしれませんが。

      以下、スタックトレースです。

      org.seasar.framework.exception.SQLRuntimeException: [ESSR0071]SQLで例外(ErrorCode=-28, SQLState=S0022)が発生しました。理由はorg.seasar.framework.exception.SSQLException: [ESSR0072]SQLで例外(SQL=[UPDATE EMP SET ,deptno = ? WHERE empno = ?], ErrorCode=

      {1}, SQLState={2})が発生しました
      at org.seasar.extension.jdbc.util.ConnectionUtil.prepareStatement(ConnectionUtil.java:52)
      at org.seasar.extension.jdbc.impl.BasicStatementFactory.createPreparedStatement(BasicStatementFactory.java:34)
      at org.seasar.extension.jdbc.impl.BasicHandler.prepareStatement(BasicHandler.java:95)
      at org.seasar.extension.jdbc.impl.BasicUpdateHandler.execute(BasicUpdateHandler.java:73)
      at org.seasar.extension.jdbc.impl.BasicUpdateHandler.execute(BasicUpdateHandler.java:66)
      at org.seasar.dao.impl.UpdateDynamicCommand.execute(UpdateDynamicCommand.java:40)
      at org.seasar.dao.impl.UpdateAutoDynamicCommandTest.testExecute2Tx(UpdateAutoDynamicCommandTest.java:68)
      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:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.java:233)
      at org.seasar.extension.unit.S2TestCase.doRunTest(S2TestCase.java:89)
      at org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:150)
      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:118)
      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)
      Caused by: org.seasar.framework.exception.SSQLException: [ESSR0072]SQLで例外(SQL=[UPDATE EMP SET ,deptno = ? WHERE empno = ?], ErrorCode={1}

      , SQLState=

      {2}

      )が発生しました
      at org.seasar.extension.dbcp.impl.ConnectionWrapperImpl.wrapException(ConnectionWrapperImpl.java:524)
      at org.seasar.extension.dbcp.impl.ConnectionWrapperImpl.prepareStatement(ConnectionWrapperImpl.java:144)
      at org.seasar.extension.jdbc.util.ConnectionUtil.prepareStatement(ConnectionUtil.java:50)
      ... 24 more
      Caused by: java.sql.SQLException: Column not found: , in statement [UPDATE EMP SET ,deptno = ? WHERE empno = ?]
      at org.hsqldb.jdbc.jdbcUtil.throwError(Unknown Source)
      at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
      at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
      at org.seasar.extension.dbcp.impl.ConnectionWrapperImpl.prepareStatement(ConnectionWrapperImpl.java:141)
      ... 25 more

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

              Created:
              Updated:
              Resolved: