FR10.0.19,用户同步突然报错

同步结果只返回同步失败,无具体报错信息,如下图image.png

详细报错信息如下:

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

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

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.dao.BaseDAO.remove(BaseDAO.java)

at com.fr.decision.authority.controller.DepartmentControllerImpl.removeDepRoleWithoutAuthority(Unknown Source)

at com.fr.decision.sync.work.impl.DepRoleSyncWork.removeDepRole(Unknown Source)

at com.fr.decision.sync.work.impl.DepRoleSyncWork.delete(Unknown Source)

at com.fr.decision.sync.TableDataSyncAction.delete(Unknown Source)

at com.fr.decision.sync.TableDataSyncAction.execute(Unknown Source)

at com.fr.decision.authority.controller.personnel.PersonnelActionManager.execute(Unknown Source)

at com.fr.decision.authority.controller.personnel.PersonnelActionManager.doWork(Unknown Source)

at com.fr.decision.authority.AuthorityContext.doPersonnelWork(Unknown Source)

at com.fr.decision.webservice.v10.user.SyncService.synchronize(Unknown Source)

at com.fr.decision.webservice.v10.user.SyncService.lambda$setSyncConfig$0(Unknown Source)

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: 将截断字符串或二进制数据。

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

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

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

... 24 more

求助这种报错排查思路

FineReport finereportzt 发布于 2024-11-28 11:19
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
Z4u3z1Lv6专家互助
发布于2024-11-28 11:21(编辑于 2024-11-28 11:22)

image.png

字段类型转化失败

---------

举个例子 :ABCD之类字符串无法转化成123这种数字类型

  • finereportzt finereportzt(提问者) 用户表都是从标准库同步过来的,那边也不可能突然换字段类型的,系统用了好几年了,突然就出现同步失败了,完全没头绪
    2024-11-29 11:49 
最佳回答
0
HHHHH123Lv7中级互助
发布于2024-11-28 11:23

检查一下同步用户的表,是不是有数据过长的,如果有备份,对比一下变化

  • finereportzt finereportzt(提问者) 有个别部门名称有变更,但是长度的话,一直都是那个长度,而且finedb文本类型最短都是255,怎么也不可能超过这个长度的,数据里也没筛选出来这么长的文本值的
    2024-11-29 11:50 
  • HHHHH123 HHHHH123 回复 finereportzt(提问者) 在完全没头绪的情况下,又没有别的报错信息,你就只能先备份,然后试着删除觉得异常的数据,至于原因找到异常数据再去分析
    2024-11-29 13:11 
  • finereportzt finereportzt(提问者) 回复 HHHHH123 我把生产的同步用户的数据集放到测试环境,同步又没问题,太奇怪了
    2024-11-30 23:28 
  • 2关注人数
  • 52浏览人数
  • 最后回答于:2024-11-28 11:23
    请选择关闭问题的原因
    确定 取消
    返回顶部