Entity failed to commit.. Duplicate column value violates its unique constraint.. - Mendix Forum

Entity failed to commit.. Duplicate column value violates its unique constraint..

1

Hi All,

We are getting this exception on a previously working code.. After an entity is created, when ever we access it for the first time this exception stared happening, but when I logout the user and login back issue is gone for the same entity, but will happen when ever  a new one is created… This started happening after I added a extra value to one of the enum filed in the entity… However issue is happening  now even after i revert it to the working version.

 

Detailed exception:

com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.data.UniqueConstraintViolationRuntimeException: Duplicate column value violates its unique constraint: integrity constraint violation: unique constraint or index violation; SYS_PK_10926 table: "communicatormessenger$recipient" (SQL State: 23505, Error Code: -104) Detail Message: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; SYS_PK_10926 table: "communicatormessenger$recipient"
    at com.mendix.basis.actionmanagement.ActionManagerBase.executeInTransactionSync(ActionManagerBase.java:125)
 

asked
2 answers
2

You are using the internal HSQL database which can become corrupted, try using postgres, this will probably solve your issue.

Other option is to remove the contents of the deployment folder and redeploy, this will delete all your app data (NOT the model itself ;))

answered
1

You might want to upgrade to at least 7.23.2. See the release notes for Mx7.23:

We fixed a unique constraint violation because of duplicate keys, because of incorrect client/server communication about objects when microflows are running in the background. (Ticket 78210, 78407, 78478, 78588, 78688, 79489)

Regards,

Ronald

 

answered