Skip to Content
1
Former Member
Dec 12, 2016 at 08:06 AM

Database Insertion issue when Intialize/debug the Platform

1634 Views

Hi Experts, We are working on SAP Hybris 6.1 , During initialization or updation i noticed one error is coming frequently

 ERROR [hybrisHTTP17] (000004NV-ImpEx-Import) [Job] Error saving log file org.springframework.dao.DuplicateKeyException: query;
 SQL [];
 Cannot insert duplicate key row in object 'dbo.medias' with unique index 'codeVersionIDX_30'. The duplicate key value is (20161207_121405.zip, ).;
 nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.medias' with unique index 'codeVersionIDX_30'. The duplicate key value is (20161207_121405.zip, ). : de.hybris.platform.jalo.JaloSystemException: org.springframework.dao.DuplicateKeyException: query;
 SQL [];
 Cannot insert duplicate key row in object 'dbo.medias' with unique index 'codeVersionIDX_30'. The duplicate key value is (20161207_121405.zip, ).;
 nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.medias' with unique index 'codeVersionIDX_30'. The duplicate key value is (20161207_121405.zip, )

I noticed this error is coming when multiple impex files are running during 1 second and SAP hybris people are saving the log file with format YYYYMMDD_HHMMSS.zip but It could be better if you can also add Milliseconds to the format, so that this issue wont occur. This code is there in Job.class file.