View Issue Details

IDProjectCategoryView StatusLast Update
0007088SymmetricDS ProBugpublic2025-10-02 12:54
Reporteremiller Assigned Toemiller  
Prioritynormal 
Status resolvedResolutionfixed 
Product Version3.15.0 
Target Version3.15.21Fixed in Version3.15.21 
Summary0007088: 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 0007086 closedemiller SymmetricDS Registration fails when a console role exists with a role ID that comes before its parent role ID alphabetically 

Activities

emiller

2025-10-01 18:25

developer   ~0003473

Last edited: 2025-10-02 12:54

View 3 revisions

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

Issue History

Date Modified Username Field Change
2025-10-01 18:25 emiller New Issue
2025-10-01 18:25 emiller Status new => assigned
2025-10-01 18:25 emiller Assigned To => emiller
2025-10-01 18:25 emiller Tag Attached: registration
2025-10-01 18:25 emiller Issue generated from: 0007086
2025-10-01 18:25 emiller Note Added: 0003473
2025-10-01 18:25 emiller Relationship added related to 0007086
2025-10-02 12:49 emiller Note Edited: 0003473 View Revisions
2025-10-02 12:54 emiller Status assigned => resolved
2025-10-02 12:54 emiller Resolution open => fixed
2025-10-02 12:54 emiller Fixed in Version => 3.15.21
2025-10-02 12:54 emiller Note Edited: 0003473 View Revisions