使用MyBaits3的ExecutorType.BATCH批量插入数据到oracle报错
一条条插入不报错,使用ExecutorType.SIMPLE批量也不报错。怎么回事呢?
ExecutorType.BATCH不能用吗??
org.apache.ibatis.exceptions.PersistenceException:
### Error committing transaction. Cause: java.lang.ArrayIndexOutOfBoundsException
### Cause: java.lang.ArrayIndexOutOfBoundsException
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:170)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:162)
at com.boco.writerfm.AppTest.testMyBatis(AppTest.java:344)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at oracle.jdbc.driver.T4CRowidAccessor.unmarshalOneRow(T4CRowidAccessor.java:202)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:610)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:213)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:952)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10580)
at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:99)
at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:117)
at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:112)
at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:167)
... 21 more