SAP Interoperability FLOC Dataload or SAP Portal does not work. Errors as SAP PLANT(CLSID 1000031392


 Product(s):APM Implementation and Performance Management
 Version(s):7.11
 Environment:N/A
 Area:N/A
 Subarea:N/A

Problem

SAP Interoperability Dataload or SAP Portal does not work. The APM error log contains errors such as SAP PLANT(CLSID 1000031392) or SAP ABC Indicator (CLSID 1000031442) as having been deleted. The error log appears as follows:

"2019-04-25 02:00:06.1065 Error DOMAIN\APM01$ Ivara.EXPLink.OQ.ObjectResolver [7] ObjectResolver.UnManagedCaxContainerPtr is return null for an ObjectRef(1000031392,2) that is not deleted.  This means we are referencing an object that does not exist on the DB.
2019-04-25 02:00:06.1065 Error DOMAIN\APM01$ Ivara.EXPLink.IVSTAGE.DataLoaderAssetSAPEquipmentDataExchangeJob [7] Failed to extract equipment records from SAP EXCEPTION OCCURRED:ObjectDeletedException An attempt was made to access an object (CLSID:1000031392 OID:2)that has been deleted.    at Ivara.EXPLink.OQ.ObjectResolver.get_UnManagedCaxContainerPtr()
   at Ivara.EXPLink.OQ.oCAXContainerObject.IsMemberRelevant(Int32 iMemberID)
   at Ivara.EXPLink.EXD.SAPPlant.get_Plant()
   at Ivara.EXPLink.IVSTAGE.DataLoaderAssetSAPEquipmentDataExchangeJob.OnPreProcessJob() in F:\SRC\hotfixes\7.11.0.203\APM\DataLoader\DataLoader\PartialsBentley\DataLoader\DataLoaderAssetSAPEquipmentDataExchangeJob.cs:line 357

2019-04-25 02:00:06.1221 Error DOMAIN\APM01$ Ivara.EXPLink.OQ.ObjectResolver [7] ObjectResolver.UnManagedCaxContainerPtr is return null for an ObjectRef(1000031442,3) that is not deleted.  This means we are referencing an object that does not exist on the DB.
2019-04-25 02:00:06.1221 Error DOMAIN\APM01$ Ivara.DataLoader.BaseDataExchangeJob`1 [7] Exception occurred processing job 'EQUIP SYNC PROD-Thursday, April 25, 2019 2:00:05 AM'.  Written to statistics.  Context='OnPreProcessJob'  The exception message was:An attempt was made to access an object (CLSID:1000031442 OID:3)that has been deleted. EXCEPTION OCCURRED:ObjectDeletedException An attempt was made to access an object (CLSID:1000031442 OID:3)that has been deleted.    at Ivara.EXPLink.OQ.ObjectResolver.get_UnManagedCaxContainerPtr()
   at Ivara.EXPLink.OQ.oCAXContainerObject.IsMemberRelevant(Int32 iMemberID)
   at Ivara.EXPLink.EXD.SAPABCIndicator.get_ABCIndicator()
   at Ivara.EXPLink.IVSTAGE.DataLoaderAssetBaseExchangeJobExtensions.BuildABCIndicatorToPriorityDict(Dictionary`2& abcIndicatorToPriorityDict) in F:\SRC\hotfixes\7.11.0.203\APM\DataLoader\DataLoader\PartialsBentley\DataLoader\DataLoaderAssetBaseExchangeJobExtensions.cs:line 80
   at Ivara.EXPLink.IVSTAGE.DataLoaderAssetSAPEquipmentDataExchangeJob.OnPreProcessJob() in F:\SRC\hotfixes\7.11.0.203\APM\DataLoader\DataLoader\PartialsBentley\DataLoader\DataLoaderAssetSAPEquipmentDataExchangeJob.cs:line 514
   at Ivara.DataLoader.BaseDataExchangeJob`1.Process(PersistentObjectReference apmProcessJob, CancellationTokenSource token) in F:\SRC\hotfixes\7.11.0.203\APM\DataLoader\DataLoader\BaseDataExchangeJob.cs:line 278"

These errors appear at first glance to be an indication of an improper mapping of the SAP Plant of SAP ABC Criticality but this is not the case. They are actually due to blank/bad SAP credentials being cached in Windows.

Solution

These issues result from a missing test of the credentials before trying to execute an SAP query. As such, we have logged two bugs:

VSTS 104702 - "Test connection to sap at the start of a dataload". This improves the error log by testing and reporting on bad credentials when running a Dataload.

VSTS 107776 - "SAP external data provider: Shared credentials are erased when switching to 'Per user' authentication". As a result of testing VSTS 107776, the second issue was found whereby the SAP External Data Provider credentials were erased when switching between “Shared” and “Per User” authentication.

Workaround: Whenever the problem occurs or when the credential password expires, the user will need to clear the cached SAP External Data Provider User Credentials on the servers running the dataloads (Job Service Provider) and smart clients (Application Server). To do this: 

  1. Go to the Job Service Provider (Dataloader) or Application (Smart Client) server:
  2. Follow process “Clear Cache Credentials” on page 46 of the APM_Interoperability_SAP_Guide
  3. Launch the APM Thick-client instance for that Job Service Provider (Dataloader) or Application (Smart Client) service
  4. On the enterprise level > Integrations view > SAP External Data Provider tab. Open the External Data Provide.
  5. Reenter the credentials on the SAP External Data Provider in APM as Shared for the SAPUSERNAME used for authenticating APM connections to SAP, then save and close the dialogue.
  6. Reopen the SAP External Data Provider.
  7. Change the Authentication back to Per User, selecting Cache Credentials and enter the SAPUSERNAME credentials one more time.
  8. Click Test Connection.
  9. Make sure to carefully enter SAPUSERNAME and the appropriate Password and Select Remember (Cache) credentials.
  10. Close the dialogue.
  11. Restart the Job Service Provider (Dataloader) or Application (Smart Client) service.

Please report an SR if you have any difficulty with this process.