Plan to upgrade form templates during an upgrade to SharePoint Server 2010/ 2013
Scenario:
I've migrated the content database from one farm to another and have changed the URL of the site. I have some InfoPath forms in the site collection. To update links that are used in user form templates and data connection files, we need to run the Update-SPInfoPathUserFileUrl cmdlet. (Reference: https://technet.microsoft.com/en-us/library/ee704551.aspx#updateLinks.).
While running the update-SPInfoPathUserFileUrl command, we are getting an exception "The Execute method of job definition Microsoft.SharePoint.Utilities.LinkReplaceTimerJob (ID d15a5af7-539d-43eb-abfd-98100f82b835) threw an exception. More information is included below. Object reference not set to an instance of an object."
ULS:
When I look at the ULS logs, I see the below stack,
09/02/2016 10:26:32.22 OWSTIMER.EXE (0x0AAC) 0x1B80 SharePoint Foundation General 8mtf Medium
Processing form template https://sharePoint/MiniProjectsRequests/Forms/template.xsn
369325dd-ac8d-4054-bf44-1c0832046be2
09/02/2016 10:26:33.32 OWSTIMER.EXE (0x0AAC) 0x1B80 SharePoint Foundation Timer 6398 Critical
The Execute method of job definition Microsoft.SharePoint.Utilities.LinkReplaceTimerJob (ID f3e682b4-aad4-47fb-a8a1-187e5a65fd49) threw an exception. More information is included below. Object reference not set to an instance of an object.
369325dd-ac8d-4054-bf44-1c0832046be2
09/02/2016 10:26:33.32 OWSTIMER.EXE (0x0AAC) 0x1B80 SharePoint Foundation Timer 72ae Unexpected
Exception stack trace:
at Microsoft.SharePoint.Utilities.SharePointLinkReplace.FixXML(Stream fileStream, Boolean fManifest, String filePath, Boolean& fChanged)
at Microsoft.SharePoint.Utilities.SharePointLinkReplace.FixXSNBinary(Byte[] originalCabBinary, String fileRelativeUrl, Boolean& fChanged)
at Microsoft.SharePoint.Utilities.SharePointLinkReplace.FixXSNFile(SPFile fileTemplate)
at Microsoft.SharePoint.Utilities.SharePointLinkReplace.FixList(SPList list)
at Microsoft.SharePoint.Utilities.SharePointLinkReplace.ProcessWeb(SPWeb web)
at Microsoft.SharePoint.Utilities.SharePointLinkReplace.DoReplaceInternal(SPSite site)
at Microsoft.SharePoint.Utilities.LinkReplaceTimerJob.ProcessSite(SPSite site, SPJobState jobState)
at Microsoft.SharePoint.Administration.SPAllSitesJobDefinition.Execute(SPContentDatabase contentDatabase, SPJobState jobState)
at Microsoft.SharePoint.Utilities.LinkReplaceTimerJob.Execute(SPContentDatabase contentDatabase, SPJobState jobState)
at Microsoft.SharePoint.Administration.SPContentDatabaseJobDefinition.Execute(SPJobState jobState)
at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result)
369325dd-ac8d-4054-bf44-1c0832046be2
Root Cause and Solution:
So basically, we are trying to fix an XML using this command. In this case, I exported the XSN file and found that 'manifest.xsf' was renamed as 'manifest - copy.xsf'. I changed it back to 'manifest.xsf' and able to fix the XSN using the command 'Update-SPInfoPathUserFileUrl'.
Posted By:
Himanshu Saxena