yhmhmmcw(提问者) 回复 莫问前程°您好,请问到添加数据库的时候,导入失败,请问是什么原因
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.third.org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:467)
at com.fr.third.org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3158)
at com.fr.third.org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2351)
at com.fr.third.org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:516)
at com.fr.third.org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:147)
at com.fr.third.org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38)
at com.fr.third.org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231)
at com.fr.third.org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65)
at com.fr.stable.db.session.SessionManager$DBSessionImpl.commitTransaction(Unknown Source)
at com.fr.decision.migration.manager.AbstractTransferManager.copyTables(Unknown Source)
at com.fr.decision.migration.manager.AbstractTransferManager.transfer(Unknown Source)
at com.fr.decision.migration.manager.AbstractTransferManager.startTransfer(Unknown Source)
at com.fr.decision.migration.MigrationContext$TransferManagerCollection.startTransfer(Unknown Source)
at com.fr.decision.migration.MigrationContext$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.BatchUpdateException: 违反了 PRIMARY KEY 约束“PK__fine_con__3213E83F1C3A20FE”。不能在对象“dbo.fine_conf_xmlentity”中插入重复键。重复键值为 (TableDataConfig.tableDatas.world.rowData)。
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(Unknown Source)
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)
... 23 more