NutzCN Logo
问答 删除 报错 Data truncation: Data too long for column 'd_entity_full_name' at row 1
发布于 3021天前 作者 qq_722cb381 1453 次浏览 复制 上一个帖子 下一个帖子
标签:

09-14 14:26:07.383 DEBUG - [NutDaoExecutor.http-bio-8080-exec-7] SQLException
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'd_entity_full_name' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3845)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1901)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1193)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2931)
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2929)
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:131)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:493)
at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:266)
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:81)
at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:264)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:31)
at org.nutz.dao.impl.DaoSupport$DaoExec.run(DaoSupport.java:254)
at org.nutz.trans.Trans.exec(Trans.java:174)
at org.nutz.trans.Trans.exec(Trans.java:132)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:224)
at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:50)
at org.nutz.dao.impl.NutDao.insert(NutDao.java:144)
at com.dgj.utils.db.dao.impl.BaseDao.delById(BaseDao.java:101)
at com.brt.museum.dao.nosupportdevice.impl.NoSupportDeviceDao$$NUTZAOP._aop_invoke(NoSupportDeviceDao.java:1)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.aop.interceptor.LoggingMethodInterceptor.filter(LoggingMethodInterceptor.java:48)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at com.brt.museum.dao.nosupportdevice.impl.NoSupportDeviceDao$$NUTZAOP.delById(NoSupportDeviceDao.java)
at com.brt.museum.service.nosupportdevice.impl.NoSupportDeviceService.deleteNoSupportDevice(NoSupportDeviceService.java:52)
at com.brt.museum.service.nosupportdevice.impl.NoSupportDeviceService$$NUTZAOP._aop_invoke(NoSupportDeviceService.java:1)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.aop.interceptor.LoggingMethodInterceptor.filter(LoggingMethodInterceptor.java:48)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at com.brt.museum.service.nosupportdevice.impl.NoSupportDeviceService$$NUTZAOP.deleteNoSupportDevice(NoSupportDeviceService.java)
at com.brt.museum.module.nosupportdevice.NoSupportDeviceModule.delete(NoSupportDeviceModule.java:127)
at com.brt.museum.module.nosupportdevice.NoSupportDeviceModule$$NUTZAOP._aop_invoke(NoSupportDeviceModule.java:1)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at com.dgj.nutz.interceptor.ExecutionTimeInterceptor.filter(ExecutionTimeInterceptor.java:28)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at com.dgj.nutz.interceptor.NameSpaceAndSessionInterceptor.filter(NameSpaceAndSessionInterceptor.java:33)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.aop.interceptor.LoggingMethodInterceptor.filter(LoggingMethodInterceptor.java:48)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at com.brt.museum.module.nosupportdevice.NoSupportDeviceModule$$NUTZAOP.delete(NoSupportDeviceModule.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:25)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:40)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:113)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:40)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:183)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

7 回复

字段类型是啥,sql是啥,代码是啥,值都是啥

来自炫酷的 NutzCN

字段 都是varchar类型 做删除操作 先执行了下面这个操作 报错
2016-09-14 14:32:12 |
For example:> "INSERT INTO dgj_bak_data(d_table_name,d_entity_full_name,d_data_info,d_del_date) VALUES('sdy_nosupport_device','com.brt.museum.bean.nosupportdevice.NoSupportDevice','{
"module" :"bleace",
"name" :"三星",
"model" :"1.23",
"version" :"12.2",
"brand" :"11",
"id" :12
}','2016-09-14 14:32:12') "
09-14 14:32:12.959 DEBUG - [NutDaoExecutor.http-bio-8080-exec-9] SQLException
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'd_entity_full_name' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3845)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)

```

是字段长度不够?

所以是insert报错呢

varchar长度不够大

来自炫酷的 NutzCN

嗯嗯,果然是 谢谢@wendal 是我把包名起长了 哈哈

@kerbores 哈哈,还得多向你学习

添加回复
请先登陆
回到顶部