Cause: java.sql.SQLException: Data truncated for column 'comment' at row 1

在尝试更新数据库时遇到错误,具体为:Data truncated for column 'comment' at row 1。错误可能涉及ClaimVoucherItemDao的insert方法。问题可能是由于插入的数据超出了'comment'列的长度限制,建议检查该字段的数据类型和输入数据是否匹配。
摘要由CSDN通过智能技术生成

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException:

Error updating database. Cause: java.sql.SQLException: Data truncated for column ‘comment’ at row 1

The error may involve com.imooc.oa.dao.ClaimVoucherItemDao.insert-Inline

The error occurred while setting parameters

SQL: insert into claim_voucher_item(claim_voucher_id,item,amount,comment) values(?,?,?,?)

Cause: java.sql.SQLException: Data truncated for column ‘comment’ at row 1

; ]; Data truncated for column ‘comment’ at row 1; nested exception is java.sql.SQLException: Data truncated for column ‘comment’ at row 1
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)
javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.imooc.oa.global.EncodingFilter.doFilter(EncodingFilter.java:21)
Root Cause

org.springframework.dao.DataIntegrityViolationException:

Error updating database. Cause: java.sql.SQLException: Data truncated for column ‘comment’ at row 1

The error may involve com.imooc.oa.dao.ClaimVoucherItemDao.insert-Inline

The error occurred while setting parameters

SQL: insert into claim_voucher_item(claim_voucher_id,item,amount,comment) values(?,?,?,?)

Cause: java.sql.SQLException: Data truncated for column ‘comment’ at row 1

; ]; Data truncated for column ‘comment’ at row 1; nested exception is java.sql.SQLException: Data truncated for column ‘comment’ at row 1
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
org.mybatis.spring.SqlSessionTemplate S q l S e s s i o n I n t e r c e p t o r . i n v o k e ( S q l S e s s i o n T e m p l a t e . j a v a : 446 ) c o m . s u n . p r o x y . SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) com.sun.proxy. SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)com.sun.proxy.Proxy20.insert(Unknown Source)
org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278)
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:57)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
com.sun.proxy. P r o x y 24. i n s e r t ( U n k n o w n S o u r c e ) c o m . i m o o c . o a . b i z . i m p l . C l a i m V o u c h e r B i z I m p l . s a v e ( C l a i m V o u c h e r B i z I m p l . j a v a : 35 ) s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d ) s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( N a t i v e M e t h o d A c c e s s o r I m p l . j a v a : 62 ) s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 ) j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 498 ) o r g . s p r i n g f r a m e w o r k . a o p . s u p p o r t . A o p U t i l s . i n v o k e J o i n p o i n t U s i n g R e f l e c t i o n ( A o p U t i l s . j a v a : 343 ) o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . R e f l e c t i v e M e t h o d I n v o c a t i o n . i n v o k e J o i n p o i n t ( R e f l e c t i v e M e t h o d I n v o c a t i o n . j a v a : 198 ) o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . R e f l e c t i v e M e t h o d I n v o c a t i o n . p r o c e e d ( R e f l e c t i v e M e t h o d I n v o c a t i o n . j a v a : 163 ) o r g . s p r i n g f r a m e w o r k . t r a n s a c t i o n . i n t e r c e p t o r . T r a n s a c t i o n A s p e c t S u p p o r t . i n v o k e W i t h i n T r a n s a c t i o n ( T r a n s a c t i o n A s p e c t S u p p o r t . j a v a : 294 ) o r g . s p r i n g f r a m e w o r k . t r a n s a c t i o n . i n t e r c e p t o r . T r a n s a c t i o n I n t e r c e p t o r . i n v o k e ( T r a n s a c t i o n I n t e r c e p t o r . j a v a : 98 ) o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . R e f l e c t i v e M e t h o d I n v o c a t i o n . p r o c e e d ( R e f l e c t i v e M e t h o d I n v o c a t i o n . j a v a : 186 ) o r g . s p r i n g f r a m e w o r k . a o p . i n t e r c e p t o r . E x p o s e I n v o c a t i o n I n t e r c e p t o r . i n v o k e ( E x p o s e I n v o c a t i o n I n t e r c e p t o r . j a v a : 93 ) o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . R e f l e c t i v e M e t h o d I n v o c a t i o n . p r o c e e d ( R e f l e c t

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值