用户同步报错

com.fr.third.org.hibernate.exception.ConstraintViolationException: could not execute batch

at com.fr.third.org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)

at com.fr.third.org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)

at com.fr.third.org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)

at com.fr.third.org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:119)

at com.fr.third.org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97)

at com.fr.third.org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147)

at com.fr.third.org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:236)

at com.fr.third.org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:617)

at com.fr.third.org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:462)

at com.fr.third.org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)

at com.fr.third.org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)

at com.fr.third.org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1294)

at com.fr.stable.db.session.SessionManager$DBSessionImpl.flush(SessionManager.java)

at com.fr.stable.db.session.DAOSessionStore$1.remove(DAOSessionStore.java)

at com.fr.stable.db.tenant.dao.BaseCombinedIdDao.remove(BaseCombinedIdDao.java)

at com.fr.decision.authority.controller.SoftDataControllerImpl.transferToSoftData(SoftDataControllerImpl.java:163)

at com.fr.decision.sync.work.impl.OneToOneSyncWork.delete(OneToOneSyncWork.java:142)

at com.fr.decision.sync.TableDataSyncAction.delete(TableDataSyncAction.java:142)

at com.fr.decision.sync.TableDataSyncAction.execute(TableDataSyncAction.java:68)

at com.fr.decision.authority.controller.personnel.PersonnelActionManager.execute(PersonnelActionManager.java:75)

at com.fr.decision.authority.controller.personnel.PersonnelActionManager.doWork(PersonnelActionManager.java:50)

at com.fr.decision.authority.AuthorityContext.doPersonnelWork(AuthorityContext.java:421)

at com.fr.decision.webservice.v10.user.SyncService.synchronize(SyncService.java:160)

at com.fr.decision.webservice.v10.user.SyncService.lambda$setSyncConfig$0(SyncService.java:112)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.sql.BatchUpdateException: 违反了 UNIQUE KEY 约束“UKinws3an4js1ibprri9efepxni”。

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:1870)

at com.fr.third.alibaba.druid.pool.DruidPooledPreparedStatement.executeBatch(DruidPooledPreparedStatement.java:565)

at com.fr.third.org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)

... 23 more

FineReport ANN0000 发布于 2023-6-26 09:29 (编辑于 2023-6-26 10:10)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
CD20160914Lv8专家互助
发布于2023-6-26 09:29(编辑于 2023-6-26 09:30)

你同步的数据有重复,检查一下自己的原始数据!!!

image.png

  • 2关注人数
  • 163浏览人数
  • 最后回答于:2023-6-26 10:10
    请选择关闭问题的原因
    确定 取消
    返回顶部