NutzCN Logo
问答 批量插入时TddlNestableRuntimeException异常
发布于 1935天前 作者 xiaowoniuxixi 4012 次浏览 复制 上一个帖子 下一个帖子
标签:
'INSERT INTO crawler_ztc_adgroup_bidword_meta(createdDate,dateTime,createdOn,updatedOn,bizId,campaignId,adGroupId,bidwordId,word,normalWord,maxPrice,mobilePrice,isDefaultPrice,auditTime,isGarbage,createTime,lastUpdateTime,wordType,onlineFlag,matchScope,averagePrice,tags,maxMobilePrice,mobileIsDefaultPrice,batchNum) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) '
CaseMessage=[f3408b16e800000-14][10.81.101.253:3306][data_center]TddlNestableRuntimeException
  at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:104)
  at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
  at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
  at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
  at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
  at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:159)
  at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithTransaction(NutDaoRunner.java:105)
  at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:89)
  at org.nutz.dao.impl.sql.run.NutDaoRunner$1.run(NutDaoRunner.java:75)
  at org.nutz.trans.Trans.exec(Trans.java:174)
  at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:73)
10 回复

这是啥数据库的异常

数据库是mySQL,用的是阿里云的DRDS

看不出报错原因,异常没贴全

08:17:21.216 [Timer-0] ERROR c.r.etl4cj.common.DBBatchQueueImpl - Give up, have error data.
org.nutz.dao.DaoException: !Nutz SQL Error: 'INSERT INTO crawler_ztc_creative_day(bizId,createdDate,dateTime,createdOn,updatedOn,ctr,cpm,cost,campaignId,creativeTitle,creativeImgUrl,creativeLinkUrl,title,click,creativeId,network,matchScope,imgUrl,campaignType,logDate,adGroupId,searchType,isshop,avgpos,campaignTitle,impression,linkUrl,indirectTransactionShipping,favitemTotal,roi,indirectCartTotal,indirectTransaction,cpc,favshopTotal,transactionShippingTotal,directTransactionShipping,transactionTotal,coverage,favtotal,directCartTotal,directTransaction,cartTotal,sub,effect,creativeType,itemId,subFilterId,batchNum) VALUES('TaoBao1961440526','2019-08-07','2019-08-07 08:17:05','2019-08-07 08:17:05','2019-08-07 08:17:05',0.0,0.0,0.0,18881471,'xxxxcp105b碳粉cp215w 205f cm215b墨粉','/i1/52415291/O1CN01sqG9Es1oxK572iR2s_!!0-saturn_solar.jpg','http://detail.xxxxx.com/item.htm?id=3123456545911','xx 适用xxxxcp105b碳粉cp215w 205f cm215b ea低温碳粉cm205f cm215fw cm205b cm205fw cm215f彩色墨粉',0,1296122309,1,'0','/i2/1961440526/TB1TN49BVOWBuNjy0FiXXXFxVXa_!!0-item_pic.jpg',0,'2019-08-06',1191811348,0,0,55,'PC无线  广撒网  计划',3,'http://detail.tmall.com/item.htm?id=37365545911',0,0,NULL,0,NULL,NULL,0,0,0,NULL,NULL,0,0,NULL,0,'network',30,0,37365545911,4,'20190807080700624') '
PreparedStatement: 
'INSERT INTO crawler_ztc_creative_day(bizId,createdDate,dateTime,createdOn,updatedOn,ctr,cpm,cost,campaignId,creativeTitle,creativeImgUrl,creativeLinkUrl,title,click,creativeId,network,matchScope,imgUrl,campaignType,logDate,adGroupId,searchType,isshop,avgpos,campaignTitle,impression,linkUrl,indirectTransactionShipping,favitemTotal,roi,indirectCartTotal,indirectTransaction,cpc,favshopTotal,transactionShippingTotal,directTransactionShipping,transactionTotal,coverage,favtotal,directCartTotal,directTransaction,cartTotal,sub,effect,creativeType,itemId,subFilterId,batchNum) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) '
CaseMessage=[f34ccc6f8401000-2][10.29.46.139:3306][data_center]TddlNestableRuntimeException
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:104)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:159)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithTransaction(NutDaoRunner.java:105)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:89)
	at org.nutz.dao.impl.sql.run.NutDaoRunner$1.run(NutDaoRunner.java:75)
	at org.nutz.trans.Trans.exec(Trans.java:174)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:73)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:56)
	at org.nutz.dao.impl.NutDao.fastInsert(NutDao.java:200)
	at org.nutz.dao.impl.NutDao.fastInsert(NutDao.java:192)
	at com.rongchi.etl4cj.common.DBBatchQueueImpl$1.lambda$commit$0(DBBatchQueueImpl.java:68)
	at org.nutz.trans.Trans.exec(Trans.java:174)
	at org.nutz.trans.Trans.exec(Trans.java:132)
	at com.rongchi.etl4cj.common.DBBatchQueueImpl$1.commit(DBBatchQueueImpl.java:60)
	at com.rongchi.etl4cj.common.DBBatchQueueImpl$1.commitGuard(DBBatchQueueImpl.java:83)
	at com.rongchi.etl4cj.common.DBBatchQueueImpl$2.run(DBBatchQueueImpl.java:105)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.sql.BatchUpdateException: [f34ccc6f8401000-2][10.29.46.139:3306][data_center]TddlNestableRuntimeException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1163)
	at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1587)
	at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1253)
	at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:970)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeBatch(DruidPooledPreparedStatement.java:566)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:322)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:90)
	... 23 common frames omitted
Caused by: java.sql.SQLException: [f34ccc6f8401000-2][10.29.46.139:3306][data_center]TddlNestableRuntimeException
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
	at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079)
	at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013)
	at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104)
	at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1548)
	... 28 common frames omitted

BatchQueueImpl - Give up, have error data.

批量插入,然后部分数据插入失败?

是的,并且是很长时间内失败的都是同一条数据

没有,id递增的,即使是同一条数据id也是不一样的

发工单问问吧

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