项目是使用Spring+SpringMVC+Mybatis构建的,使用JUnit4写了个测试类直接调用serivice层的update方法是可以成功插入,但是在Controler层调用service中的update方法就报错,下o:
Cause: java.sql.SQLException: 数据大小超出此类型的最大值: 35845
; uncategorized SQLException for SQL []; SQL state [null]; error code [17070]; 数据大小超出此类型的最大值: 35845; nested exception is java.sql.SQLException: 数据大小超出此类型的最大值: 35845
org.springframework.jdbc.UncategorizedSQLException:
Error updating database. Cause: java.sql.SQLException: 数据大小超出此类型的最大值: 35845
The error may involve com.ffcs.cq.repository.mybatis.work.BugMybatisDao.update-Inline
The error occurred while setting parameter DETAIL=? WHERE DBID = ?
Cause: java.sql.SQLException: 数据大小超出此类型的最大值: 3650
; uncategorized SQLException for SQL []; SQL state [null]; error code [17070]; 数据大小超出此类型的最大值: 3650; nested exception is java.sql.SQLException: 数据大小超出此类型的最大值: 3650
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84) ~[spring-jdbc-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-1.2.2.jar:1.2.2]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371) ~[mybatis-spring-1.2.2.jar:1.2.2]
at com.sun.proxy.$Proxy18.update(Unknown Source) ~[na:na]
at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:254) ~[mybatis-spring-1.2.2.jar:1.2.2]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:54) ~[mybatis-3.2.8.jar:3.2.8]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) ~[mybatis-3.2.8.jar:3.2.8]
at com.sun.proxy.$Proxy35.update(Unknown Source) ~[na:na]
at com.ffcs.cq.service.work.BugService.modify(BugService.java:395) ~[BugService.class:na]
at com.ffcs.cq.service.work.BugService$$FastClassBySpringCGLIB$$83194116.invoke() ~[spring-core-4.0.5.RELEASE.jar:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708) ~[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]