六月 30, 2016 5:47:47 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
六月 30, 2016 5:47:47 下午 org.springframework.jdbc.support.SQLErrorCodesFactory
信息: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
17:47:47.070 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1fe94663]
17:47:47.072 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1fe94663]
六月 30, 2016 5:47:47 下午 org.springframework.test.context.TestContextManager afterTestMethod
警告: Caught exception while allowing TestExecutionListener [org.springframework.test.context.transaction.TransactionalTestExecutionListener@77863738] to process ‘after’ execution for test: method [public void com.portx.system.AccountServiceTest.testGetById1()], instance [com.portx.system.AccountServiceTest@c937ad6], exception [org.springframework.jdbc.UncategorizedSQLException:
Error querying database. Cause: java.sql.SQLException: 数字溢出
The error may exist in file [D:\workspaces\workspace_wxjc\ykportx-order-mgt\target\classes\mybatis\mapper\ediAccountHead-mapper.xml]
The error may involve com.portx.system.dao.impl.EdiAccountHeadDaoImpl.getById-Inline
The error occurred while setting parameters
SQL: SELECT * FROM edi_account_head WHERE id = ?
Cause: java.sql.SQLException: 数字溢出
; uncategorized SQLException for SQL []; SQL state [null]; error code [17026]; 数字溢出; nested exception is java.sql.SQLException: 数字溢出]
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:720)
at org.springframework.test.context.transaction.TransactionalTestExecutionListener
TransactionContext.endTransaction(TransactionalTestExecutionListener.java:595)atorg.springframework.test.context.transaction.TransactionalTestExecutionListener.endTransaction(TransactionalTestExecutionListener.java:294)atorg.springframework.test.context.transaction.TransactionalTestExecutionListener.afterTestMethod(TransactionalTestExecutionListener.java:189)atorg.springframework.test.context.TestContextManager.afterTestMethod(TestContextManager.java:411)atorg.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:91)atorg.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)atorg.junit.runners.ParentRunner
3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner
1.schedule(ParentRunner.java:60)atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)atorg.junit.runners.ParentRunner.access
000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
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:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
org.springframework.jdbc.UncategorizedSQLException:
Error querying database. Cause: java.sql.SQLException: 数字溢出
The error may exist in file [D:\workspaces\workspace_wxjc\ykportx-order-mgt\target\classes\mybatis\mapper\ediAccountHead-mapper.xml]
The error may involve com.portx.system.dao.impl.EdiAccountHeadDaoImpl.getById-Inline
The error occurred while setting parameters
SQL: SELECT * FROM edi_account_head WHERE id = ?
Cause: java.sql.SQLException: 数字溢出
; uncategorized SQLException for SQL []; SQL state [null]; error code [17026]; 数字溢出; nested exception is java.sql.SQLException: 数字溢出
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate
SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)atcom.sun.proxy.
Proxy20.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
at com.portx.ykportx.core.BaseDAOImpl.getById(BaseDAOImpl.java:112)
at com.portx.system.service.impl.EdiAccountHeadServiceImpl.findById(EdiAccountHeadServiceImpl.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor
1.proceedWithInvocation(TransactionInterceptor.java:98)atorg.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)atorg.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)atorg.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)atcom.sun.proxy.
Proxy28.findById(Unknown Source)
at com.portx.system.AccountServiceTest.testGetById1(AccountServiceTest.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod
1.runReflectiveCall(FrameworkMethod.java:45)atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)atorg.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)atorg.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)atorg.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)atorg.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)atorg.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)atorg.junit.runners.ParentRunner
3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner
1.schedule(ParentRunner.java:60)atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)atorg.junit.runners.ParentRunner.access
000(ParentRunner.java:50)
at org.junit.runners.ParentRunner
2.evaluate(ParentRunner.java:222)atorg.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)atorg.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)atorg.junit.runners.ParentRunner.run(ParentRunner.java:300)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)atorg.junit.runner.JUnitCore.run(JUnitCore.java:157)atcom.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)atcom.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)atcom.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atcom.intellij.rt.execution.application.AppMain.main(AppMain.java:140)Causedby:java.sql.SQLException:数字溢出atoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)atoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147)atoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:209)atoracle.jdbc.driver.NumberCommonAccessor.throwOverflow(NumberCommonAccessor.java:7465)atoracle.jdbc.driver.NumberCommonAccessor.getInt(NumberCommonAccessor.java:103)atoracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:527)atoracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1563)atcom.alibaba.druid.filter.FilterChainImpl.resultSetgetInt(FilterChainImpl.java:837)atcom.alibaba.druid.filter.FilterAdapter.resultSetgetInt(FilterAdapter.java:1605)atcom.alibaba.druid.filter.FilterChainImpl.resultSetgetInt(FilterChainImpl.java:835)atcom.alibaba.druid.filter.FilterAdapter.resultSetgetInt(FilterAdapter.java:1605)atcom.alibaba.druid.filter.FilterChainImpl.resultSetgetInt(FilterChainImpl.java:835)atcom.alibaba.druid.proxy.jdbc.ResultSetProxyImpl.getInt(ResultSetProxyImpl.java:344)atcom.alibaba.druid.pool.DruidPooledResultSet.getInt(DruidPooledResultSet.java:293)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atorg.apache.ibatis.logging.jdbc.ResultSetLogger.invoke(ResultSetLogger.java:59)atcom.sun.proxy.
Proxy39.getInt(Unknown Source)
at org.apache.ibatis.type.IntegerTypeHandler.getNullableResult(IntegerTypeHandler.java:34)
at org.apache.ibatis.type.IntegerTypeHandler.getNullableResult(IntegerTypeHandler.java:23)
at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:51)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.getPropertyMappingValue(FastResultSetHandler.java:325)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.applyPropertyMappings(FastResultSetHandler.java:301)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.getRowValue(FastResultSetHandler.java:270)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleRowValues(FastResultSetHandler.java:216)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:188)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:154)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:57)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:46)
at com.github.pagehelper.SqlUtil._processPage(SqlUtil.java:401)
at com.github.pagehelper.SqlUtil.processPage(SqlUtil.java:374)
at com.github.pagehelper.PageHelper.intercept(PageHelper.java:254)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:57)
at com.sun.proxy.
Proxy36.query(UnknownSource)atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atorg.mybatis.spring.SqlSessionTemplate
SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)
… 49 more
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:720)
at org.springframework.test.context.transaction.TransactionalTestExecutionListener
TransactionContext.endTransaction(TransactionalTestExecutionListener.java:595)atorg.springframework.test.context.transaction.TransactionalTestExecutionListener.endTransaction(TransactionalTestExecutionListener.java:294)atorg.springframework.test.context.transaction.TransactionalTestExecutionListener.afterTestMethod(TransactionalTestExecutionListener.java:189)atorg.springframework.test.context.TestContextManager.afterTestMethod(TestContextManager.java:411)atorg.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:91)atorg.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)atorg.junit.runners.ParentRunner
3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner
1.schedule(ParentRunner.java:60)atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)atorg.junit.runners.ParentRunner.access
000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:720)
at org.springframework.test.context.transaction.TransactionalTestExecutionListener
TransactionContext.endTransaction(TransactionalTestExecutionListener.java:595)atorg.springframework.test.context.transaction.TransactionalTestExecutionListener.endTransaction(TransactionalTestExecutionListener.java:294)atorg.springframework.test.context.transaction.TransactionalTestExecutionListener.afterTestMethod(TransactionalTestExecutionListener.java:189)atorg.springframework.test.context.TestContextManager.afterTestMethod(TestContextManager.java:411)atorg.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:91)atorg.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)atorg.junit.runners.ParentRunner
3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner
1.schedule(ParentRunner.java:60)atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)atorg.junit.runners.ParentRunner.access
000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
解决:
1、检查entity和oracle数据库的字段类型是否一致
2、mapper映射是否错误