We have Data.com, namespace jigsaw_clean, v 2.16.2 installed and I am encountering an sObject type error when I try to do a simple DML statement in a unit test script. The test method instantiates a global method from another managed package (rh2) and then attempts to insert a bare bones Contact record.
The following is a snippet from the debug log for your reference:
15:11:47.071 (1071657000)|SYSTEM_METHOD_ENTRY|[42]|system.Type.newInstance()
15:11:47.071 (1071757000)|SYSTEM_METHOD_EXIT|[42]|system.Type.newInstance()
15:11:47.071 (1071877000)|ENTERING_MANAGED_PKG|rh2
15:11:47.290 (1290890000)|DML_BEGIN|[1237]|Op:Insert|Type:rh2__Date_Sync__c|Rows:1
15:11:47.347 (1347012000)|DML_END|[1237]
15:11:47.347 (1347133000)|DML_BEGIN|[52]|Op:Insert|Type:Contact|Rows:1
15:11:47.370 (1370901000)|DML_END|[52]
15:11:47.370 (1370990000)|EXCEPTION_THROWN|[52]|System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, INVALID_TYPE: sObject type 'DataDotComEntitySetting' is not supported.: []
We already run in a system context in the other managed package and exclude 'with sharing' in the class signatures. This exception is not encountered in the unit test script if the DML is performed before the the global class is instantiated or if the global class is not included in the test script.
Has anyone else encountered this behavior before? Any ideas or information to gather that will help us resolve or troubleshoot further?