Symptoms
During the use the PandD (Package and Deployment), we get a message "Missing Reference" and then it's not possible to continue to deploy the package. The issue appears on a SmartObject linked to a SharePoint Library with a lot to Lookup.
Diagnoses
The issue "Missing Reference" could be linked to: - The fact that the Sharepoint list linked to the Smart Object have (lot of) look up. - The fact that there are 2 Smart Objects objects linked to the same Service Type (Same Sharepoint List): The default one and the one created from the Service Object with the Smart object service tester (on another category) - On the Package and Deployment, you let the check-box "Continue Deploying packaged items if one or more items cannot be deployed" not ticked. We get another curious behaviour and we reproduce only once on K2 environment: With 2 lists with Lookup (List Company and List Employee for example), we created package with: - 2 Smart objects created by SharePoint - 2 Smart objects created from the Service Object with the Smart object service tester (on another category) We deploy a first this package on another K2 server (with different Site Collection name). After, during next deploy, the button Next was not available if we use "Use existing Smart Object", only "Create New version of the Smo" allow us to click on Next button. Problem for customer about the workaround of use "Create New version of the Smo": if we do this, the is an impact of InfoPath forms: he will need to be re-deployed.
Resolution
After check of the state of the K2 For Sharepoint on the Sharepoint site, we saw following error: Error at the step "Sharpoint Service Broker" of the Registration Wizard: Root element is missing. After a delete on the Table HostServer].eGroupProvider] for the current Site collection, we saw following error: Error at the step "Sharpoint Service Broker" of the Registration Wizard: "SmartObject Server Exception: Inconsistency detected on SmartObject 'K2 Application'. Service Instance 'xxxxxx' not found during loading of SmartObject Definition." Clean (Delete) of tSmartBroker].rSmartObject], jSmartBroker].rSmartObject], jIntegration].aProcessSharePointGeneralSetting] and gSmartBroker].rServiceInstance] After this, we don't have any issue using Sharepoint Registration wizard and we were able to access to the "Application K2" on the Ribbon bar without issue. On production, we wasn't able to do this type of clean. Finally the customer fix the issue of generation of the package by generation of several package (without only one par of Smart Object) and playing with cjeck-box of the PandD: - "Automatically select all items (recommended)" / "Manually select specific items" -> generally choosing "Manually select specific items" - Full/Partial - "Continue Deploying packaged items if one or more items cannot be deployed"