LOADSPEC ERROR: Object reference not set to an instance of an object during loadspec for a batch extension

When performing loadspec into a 2.93 environment, a .NET error occurs when running a script to load a batch extension table.  It fails the first time, but if it's run again, it succeeds.  The full error is:

LOADSPEC ERROR:Object reference not set to an instance of an object.
Msg 6522, Level 16, State 1, Procedure USP_LOADSPEC, Line 0
A .NET Framework error occurred during execution of user-defined routine or aggregate "USP_LOADSPEC":
System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException:
at Blackbaud.AppFx.Platform.SqlClr.BatchTemplateProcessor.UpdateFormFieldsFromBatchExtensionFields(FormMetaData batchTemplateFormMetaData, Dictionary`2 ffList, FormMetaData newExtensionFormMetaData)
at Blackbaud.AppFx.Platform.SqlClr.BatchTemplateProcessor.UpdateBatchTemplateForBatchTypeExtension(List`1 batchTemplates, FormMetaData newfmd, Nullable`1 changeAgentID)
at Blackbaud.AppFx.Platform.SqlClr.BatchTypeExtensionSpecProcessor.ProcessSpec(BatchTypeExtensionSpec batchExtensionSpec, Nullable`1 changeAgentID, Boolean reloadBatchSpec, Boolean validateFormFieldsForExtension)
at Blackbaud.AppFx.Platform.SqlClr.BatchTypeExtensionSpecProcessor.ProcessSpec(String specXml, Nullable`1 changeAgentID)
at Blackbaud.AppFx.Platform.SqlClr.BatchTypeExtensionSpecCLR.ProcessSpec(String specXml, Nullable`1 changeAgentID)
at Blackbaud.AppFx.Platform.SqlClr.LoadSpec.LoadSpecAsString(String specXmlText, Nullable`1 changeAgentID, SqlString sourceName, SqlString itemName, SqlBoolean loadAsDependency, SqlBoolean forceReload, SqlBoolean processPageAlterations, SqlBoolean skipValidation, SqlBoolean compareToExistingSpecXml)
at Blackbaud.AppFx.Platform.SqlClr.LoadSpec.LoadSpec(SqlXml specXml, Nullable`1 changeAgentID, SqlString sourceName, SqlString itemName, SqlBoolean loadAsDependency, SqlBoolean forceReload, SqlBoolean processPageAlterations, SqlBoolean skipValidation, SqlBoolean compareToExistingSpecXml)

Download and install the latest version and patch, if applicable. 

Environment

 2.93.2034
 3.0.516

Was this article helpful?