Symptoms
Created a package from UAT environment and deployed it to the Production environment. The deployment went through successfully.
Create a package from the Production site and try deploying to the another sub-sites within the Production site collection, an error is thrown during the packaging process 'Error has been thrown by the target of an invocation'.
Stack Trace -
Type:
SourceCode.SmartObjects.Client.SmartObjectException
Source:
SourceCode.SmartObjects.Client
Method Base
Member Type:
Method
Name:
ExecuteScalar
Module
Scope Name:
SourceCode.SmartObjects.Client.dll
Declaring Type
Full Name:
SourceCode.SmartObjects.Client.SmartObjectClientServer
Stack Trace:
at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteScalar(SmartObject smartObject, DataTable inputTable)
at SourceCode.Forms.AppFramework.FormRuntime.SmartObjectExecution(XPathNavigator nav, Boolean outputDependencies, SmartObjectClientServer svr)
at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(String xml)
at SourceCode.Forms.Runtime.AJAXCall.ProcessRequest(HttpContext context)
Diagnoses
We found that it was due to Association names have repetition in the name making it longer than 260 chars.
Resolution
Labs provided a script was applied to fix the issue.
Association names have repetition in the name making it longer than 260 chars.
The script will take these out and fix it in DB which then allows to create package.
Please contact support if similar scripts are needed as this was client specific scripts.