View Issue Details

IDProjectCategoryView StatusLast Update
0007086SymmetricDSBugpublic2025-10-07 22:42
Reporteremiller Assigned Toemiller  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.15.0 
Target Version3.16.7Fixed in Version3.16.7 
Summary0007086: Registration fails when a console role exists with a role ID that comes before its parent role ID alphabetically
DescriptionWhen a console role exists with a Role ID that comes before its Parent Role ID alphabetically, any nodes attempting to register fail to process the registration batch due to the below error. This is because the data extracted from the sym_console_role table is ordered by role_id, which doesn't take the self-referencing foreign key from parent_role_id to role_id into account.

2025-10-01 09:06:08,519 WARN [client] [DefaultDatabaseWriter] [client-dataloader-1] Failed to process insert event in batch server--9999 at line 58 on channel 'config'.
Failed sql was: insert into "CLIENT"."PUBLIC"."SYM_CONSOLE_ROLE" ("ROLE_ID", "PARENT_ROLE_ID", "ROLE_DESCRIPTION", "CREATE_TIME", "LAST_UPDATE_BY", "LAST_UPDATE_TIME") values ('ABC','READ','test',{ts '2025-10-01 08:59:17.769'},'no_user',{ts '2025-10-01 09:03:55.046'})'ABC'
Failed raw sql was: insert into "CLIENT"."PUBLIC"."SYM_CONSOLE_ROLE" ("ROLE_ID", "PARENT_ROLE_ID", "ROLE_DESCRIPTION", "CREATE_TIME", "LAST_UPDATE_BY", "LAST_UPDATE_TIME") values (?,?,?,?,?,?)
Failed sql parameters: ['ABC', 'READ', 'test', {ts '2025-10-01 08:59:17.769'}, 'no_user', {ts '2025-10-01 09:03:55.046'}, 'ABC']
Failed sql parameters types: [VARCHAR, VARCHAR, VARCHAR, TIMESTAMP, VARCHAR, TIMESTAMP]
Failed sql state and code: 23506 (23506)
Failed row data was: "ABC","READ","test","2025-10-01 08:59:17.769","no_user","2025-10-01 09:03:55.046"
org.jumpmind.db.sql.SqlException: Referential integrity constraint violation: "SYM_FK_CONROLE_CONROLE: PUBLIC.SYM_CONSOLE_ROLE FOREIGN KEY(PARENT_ROLE_ID) REFERENCES PUBLIC.SYM_CONSOLE_ROLE(ROLE_ID) ('READ')"; SQL statement:
insert into "CLIENT"."PUBLIC"."SYM_CONSOLE_ROLE" ("ROLE_ID", "PARENT_ROLE_ID", "ROLE_DESCRIPTION", "CREATE_TIME", "LAST_UPDATE_BY", "LAST_UPDATE_TIME") values (?,?,?,?,?,?) [23506-224]
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:308)
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:297)
    at org.jumpmind.db.sql.JdbcSqlTransaction.addRow(JdbcSqlTransaction.java:445)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.execute(DefaultDatabaseWriter.java:1228)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.insert(DefaultDatabaseWriter.java:286)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:192)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:62)
    at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:98)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:62)
    at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:187)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:194)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:160)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:108)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1103)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Referential integrity constraint violation: "SYM_FK_CONROLE_CONROLE: PUBLIC.SYM_CONSOLE_ROLE FOREIGN KEY(PARENT_ROLE_ID) REFERENCES PUBLIC.SYM_CONSOLE_ROLE(ROLE_ID) ('READ')"; SQL statement:
insert into "CLIENT"."PUBLIC"."SYM_CONSOLE_ROLE" ("ROLE_ID", "PARENT_ROLE_ID", "ROLE_DESCRIPTION", "CREATE_TIME", "LAST_UPDATE_BY", "LAST_UPDATE_TIME") values (?,?,?,?,?,?) [23506-224]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:520)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
    at org.h2.message.DbException.get(DbException.java:223)
    at org.h2.message.DbException.get(DbException.java:199)
    at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:311)
    at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:252)
    at org.h2.table.Table.fireConstraints(Table.java:1200)
    at org.h2.table.Table.fireAfterRow(Table.java:1218)
    at org.h2.command.dml.Insert.insertRows(Insert.java:188)
    at org.h2.command.dml.Insert.update(Insert.java:135)
    at org.h2.command.dml.DataChangeStatement.update(DataChangeStatement.java:74)
    at org.h2.command.CommandContainer.update(CommandContainer.java:169)
    at org.h2.command.Command.executeUpdate(Command.java:256)
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:216)
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:174)
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:137)
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:137)
    at org.jumpmind.db.sql.JdbcSqlTransaction.executePreparedUpdate(JdbcSqlTransaction.java:464)
    at org.jumpmind.db.sql.JdbcSqlTransaction.addRow(JdbcSqlTransaction.java:442)
    ... 16 more
Tagsregistration

Relationships

related to 0007088 resolvedemiller SymmetricDS Pro Registration fails when a console role exists with a role ID that comes before its parent role ID alphabetically 

Activities

emiller

2025-10-01 16:21

developer   ~0003471

Last edited: 2025-10-02 13:53

View 2 revisions

Merged PR: https://github.com/jumpmindinc/symmetric-ds/pull/403

emiller

2025-10-02 13:55

developer   ~0003474

Cherry-picked to 3.17: https://github.com/jumpmindinc/symmetric-ds/commit/fa1556568e61ab0a15912dd3239f377f021aec29

pbelov

2025-10-06 20:14

manager   ~0003487

Included in the 3.16.7 release

Issue History

Date Modified Username Field Change
2025-10-01 15:39 emiller New Issue
2025-10-01 15:39 emiller Status new => assigned
2025-10-01 15:39 emiller Assigned To => emiller
2025-10-01 15:39 emiller Tag Attached: registration
2025-10-01 16:21 emiller Note Added: 0003471
2025-10-01 18:25 emiller Issue cloned: 0007088
2025-10-01 18:25 emiller Relationship added related to 0007088
2025-10-02 13:53 emiller Status assigned => resolved
2025-10-02 13:53 emiller Resolution open => fixed
2025-10-02 13:53 emiller Fixed in Version => 3.16.7
2025-10-02 13:53 emiller Target Version 3.16.8 => 3.16.7
2025-10-02 13:53 emiller Note Edited: 0003471 View Revisions
2025-10-02 13:55 emiller Note Added: 0003474
2025-10-06 20:14 pbelov Note Added: 0003487
2025-10-06 20:14 pbelov Status resolved => closed
2025-10-07 22:42 pbelov Project SymmetricDS Pro => SymmetricDS