java.sql.BatchUpdateException: Duplicate Entry...

Jordan Vignoni
Tera Guru

Good evening,

I'm experiencing an issue where I'm unable to update the Question of a variable in a record producer without getting the following message:Database_Error.png

The message is consistent for all record producers, but the information between "question-question_text" and "key 'name_2" changes based on the Question I'm attempting to update.   Also, all the text in the Question column shows as blue (as shown below):

Question_Column.png

Also, this is only impacting my personal account.   I'm able to impersonate another user with access to edit record producers and updates are able to be made with no issues.   I believe this all started when I tested an onSubmit() client script (that updates the user record when the end-user updates the contact information) using my personal account.   This led me to disable the client script, as well as create another way that documents the contact changes into the record producer (rather than to the user record) because the onSubmit() client script seemed to be the cause in my testing with other accounts.   However, my account still will not allow changes to the Question of an existing variable on any record producer.

Any ideas on how to resolve this message from showing when editing the Question of a record producer?

Thanks in advance!

13 REPLIES 13

Pratik Malviya
Tera Guru

Hi 

Jordan Vignoni,
 
This is must be due to the duplicate entry of the record, If you check the same record on the parent table, then  you could see there must be a duplicate record, so either you can delete that record from the parent table and try to create new in child table. or if possible you can update the sys_class name of the parent record.
 
If my solution is helpful for you, then please mark this as "Helpful".
 
Thanks & Regards,
Pratik Malviya.
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Thanks,
Pratik Malviya

Duncan Pederse1
Giga Expert

To follow on some of the above posts that mention 'Language' field on 'sys_user' record being an issue.. I did notice that when this happened to me, the Language field on my User record was set to 'NUL' (inexplicably).

Clearing the language field, and then logging out and logging back in worked for me.

(Also, I think this language field must be critical to whatever is causing this problem, as all of the records I attempted to update were creating 'Sys_Translation' records in my update set.)

B_SAI REVANTH
Tera Contributor

Yes... It worked.
Changed the language to english in my user profile and deleted the translated records and tried again.


I have followed the steps from this article.
https://community.servicenow.com/community?id=community_article&sys_id=8d693608db32d810fb115583ca961...

Meghan Tomai
Tera Contributor

In case anyone struggles with this in the future. We had added new fields to the user record for our HR implementation. When doing some development with those fields it must have messed up my admin settings. To fix this I exported the XML of my production user record and imported it into my sub prod environment that was affected. Just to be safe I logged out and cleared my cache. This returned my profile back to fully functioning.