cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate key abc(attempted merging values) Hybris giving error after upgradation

0 Kudos

I am facing issue with updating some of the users after upgrading hybris from 6.5 to 2205.11.

de.hybris.platform.servicelayer.exceptions.ModelSavingException: Duplicate key abc(attempted merging values de.hybris.platform.directpersistence.cache.SLDDataContainer$AttributeValue@3443c8aa[name=abc,value=<null>,langPk=8796093055008] and de.hybris.platform.directpersistence.cache.SLDDataContainer$AttributeValue@7829be1f[name=abc,value=<null>,langPk=8796093513760])

I went through the below links:

https://me.sap.com/notes/0003211013

https://answers.sap.com/questions/13291626/duplicate-key-error-when-saving-a-customer-in-sap.html

But when querying userprops table, I am not able to get any result. I am not able to update users via code, impex(hac) or even backoffice. Any suggestions or feedbacks are most welcomed.

Accepted Solutions (0)

Answers (1)

Answers (1)

deepak_madan
Explorer
0 Kudos

Hi Archit

Have your tired below mentioned step? if yes please share what you faced after that?

The solution for us has been basically ensuring that we didn't have any dontOptimize=true attribute in the User entity and truncating the content of USERPROPS table.

In your case, you should check if the affected entity has content in the *PROPS table. If you can find in that table any data related to attributes that are not tagged as dontOptimize=true, you should remove that content because it's not used anymore and is conflicting in the audit.

0 Kudos

Hi Deepak,

I am not able to find data in props table. I tried searching the below SQL queries in hac:

Select * FROM props where ITEMTYPEPK=0000 // PK of Customer item type

Select * FROM props where ITEMPK=0000 // PK of a customer row which is not updating and giving the above error

Select * FROM userprops

All the above are giving no results. Am I doing something wrong here?

deepak_madan
Explorer
0 Kudos

Hi Archit

I understand that you might have tried select query from hac but try to delete one specific data from userprops table using hac .if yo are able to delete then go ahead with truncating otherwise try below solution as well.

Try to connect to DB directly via workbench and try to run these queries. i am hopeful that you will get some result otherwise dtry to take from DBA,