View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004859 | SymmetricDS | Bug | public | 2021-03-01 16:05 | 2021-03-30 19:46 |
Reporter | elong | Assigned To | elong | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.12.0 | ||||
Target Version | 3.12.8 | Fixed in Version | 3.12.8 | ||
Summary | 0004859: SQL-Server error cannot update identity column during auto resolution | ||||
Description | On SQL-Server/Sybase, identity columns cannot be updated, but if the column is included in a unique index constraint and there is a conflict, the auto resolver will attempt to lock the row using the index, which results in an error of "cannot update identity column". 2021-03-01 20:15:40,947 ERROR [Ship-1] [ManageIncomingBatchListener] [ship-1-dataloader-482] Failed to load batch shore01-889 StackTraceKey.init [SqlException:24023386] org.jumpmind.db.sql.SqlException: Cannot update identity column 'Shipment No_'. at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:313) at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:302) at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:398) at org.jumpmind.db.sql.JdbcSqlTransaction.prepareAndExecute(JdbcSqlTransaction.java:364) at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriterConflictResolver.isCaptureTimeNewerForUk(DefaultDatabaseWriterConflictResolver.java:271) at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriterConflictResolver.isCaptureTimeNewer(DefaultDatabaseWriterConflictResolver.java:190) at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriterConflictResolver.needsResolved(AbstractDatabaseWriterConflictResolver.java:99) at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:214) at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64) at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:84) at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64) at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:202) at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:212) at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:178) at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124) at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1085) at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1061) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.sql.SQLException: Cannot update identity column 'Shipment No_'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:784) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) at org.jumpmind.db.sql.JdbcSqlTransaction$6.execute(JdbcSqlTransaction.java:374) at org.jumpmind.db.sql.JdbcSqlTransaction$6.execute(JdbcSqlTransaction.java:364) at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:396) ... 18 more | ||||
Tags | conflict manager, dialect: sql-server | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-01 16:05 | elong | New Issue | |
2021-03-01 16:05 | elong | Status | new => assigned |
2021-03-01 16:05 | elong | Assigned To | => elong |
2021-03-01 16:05 | elong | Tag Attached: conflict manager | |
2021-03-01 16:05 | elong | Tag Attached: dialect: sql-server | |
2021-03-01 16:09 | elong | Status | assigned => resolved |
2021-03-01 16:09 | elong | Resolution | open => fixed |
2021-03-01 16:09 | elong | Fixed in Version | => 3.12.8 |
2021-03-01 16:09 | elong | Summary | SQL-Server error cannot update identity column during auto resoluion => SQL-Server error cannot update identity column during auto resolution |
2021-03-01 17:00 | admin | Changeset attached | => SymmetricDS 3.12 716680e4 |
2021-03-30 19:46 | admin | Status | resolved => closed |