Hello Folks,
I got this below error in my process. I am not updating anything in the process. Please assist
An error occurred while trying to write to the entity "EMP_CASE " [id=916ee3cb-938e-4931-a61b-ba630fe5a543@61527, type=EMP_CASE (id=5350)] (data store: EMP Main DS). Details: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement: org.hibernate.exception.ConstraintViolationException: could not execute statement: java.sql.SQLIntegrityConstraintViolationException: (conn=7948467) Duplicate entry '229' for key 'EmpID': org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Duplicate entry '229' for key 'EmpID': java.sql.SQLException: Duplicate entry '229' for key 'EmpID' Data: TypedValue[it=5351,v={{<null>,229,eFront,89777,<null>,<null>,Open,0,TEST,Case,1,1,0,,1.0,56777,<null>,<null>,,,<null>,,<null>,,<null>,,<null>,,<null>,2024-09-16 17:43:20.39}}]
Discussion posts and replies are publicly visible
Could you check and confirm if your DB has value already stored for EmpID: 229.
This happens when you have used auto increment in Appian and Database Sequence has already passed that value or contains some value for given sequence.
Yes, DB already has record against 229.
Verify if the last record in DB and the Sequence is same or not. If not you will keep on getting this error.
You can google to set the index in DB.
Highlighted one is autoincrement ID column and next one is EmpId column.
Did you try checking the logs for more information?
Are you seeing multiple instance getting created when you run this process ? If yes, its quite possible that your process is configured as MNI.
What is the nature of EmpId column? Is it a foreign key?
Yes. But MNI is not configured
Primary key
Hi Manjit,
I believe 'EmpID' is a foreign key in the 'EMP_CASE' table. If that's the case, could you verify whether a 'UNIQUE' key constraint has been added to this column? Since this is a one-to-many relationship, where multiple cases can be raised for an employee, the unique key constraint is not required and can be removed if it has been added