cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SavedValues CleanUp Cron Job Error

0 Likes
907

Hi , when running cleanup saved values cronjob getting this error

Value is required, null given for key: item

List in process method which are being fetched from db are null. did any one face this issue?

View Entire Topic
skotni
Explorer
0 Likes

Hi Asish,

Can you run this query and check the saved value records for which the 'modified item' reference is null.

"SELECT {pk} FROM {SavedValues} where {MODIFIEDITEM} is null"

Hybris creates saved value record when some one deletes an 'Item'. This record will have modification type as 'removed'. However these entries will not have the item reference since the item was removed.

And, the 'CleanupSavedValuesStrategy' is not capable of processing such records and gives the error in its execution. The error comes from 'process()' method of the strategy.

Option1: Delete these records manually from DB (Manual step though an impex that will remove the saved value entry as well). This will resolve the error observed in cronjob.

Option2: Write your own strategy (extend OOTB cleanup strategy) to process and cleanup such records for which modified item is null.

Thanks, Krishna