2019-09-08

Error processing policy updates

I've seen error event with Event ID 7997 in the Event log. Task category is Information Policy Management.
Error processing policy updates for site http://site for list listname.
Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.RecordsManagement.InformationPolicy.ListPolicySettings.get_UseListPolicy() at Microsoft.Office.RecordsManagement.InformationPolicy.Policy.<>c__DisplayClass5.<>c__DisplayClass7.b__1(SPList list) at Microsoft.Office.Server.Utilities.ContentIterator.ProcessLists(SPListCollection lists, ListProcessor listProcessor, ListProcessorErrorCallout errorCallout)
List listname is a part of custom feature.
Initial analysis points to Information management policy timer job.
Inner exception is Arithmetic overflow error converting expression to data type int. SQL Server stored procedure: proc_GetDocsMetaInfo.
Upon further digging I found that store procedure causing the issue was dbo.proc_GetDocsMetaInfoSingle. In particular it was this part: Lists.tp_BaseType + Lists.tp_ServerTemplate * 256. This caused arithmetic overflow because Type for ListTemplate was set to a value greater than 10,000,000. Once I reduced the value error was not present any more.

This must be obeyed:
BaseType + Type * 256 < 2^31 - 1

No comments:

Post a Comment