Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More

Unknown java.util.Collection.size() Error in DataMapper When Executing from Preview

Publish Date: Aug 19, 2025
Description

When executing a DataMapper from the Preview mode, users may encounter the following error:
Error: "Cannot invoke \"java.util.Collection.size()\" because \"c\" is null"

Unknown error: java.util.Collection.size() 
Note: Please be aware that all components utilizing the DataMapper will be impacted if it fails. Its failure is characterised by no data being returned or same error being thrown across all dependent components.

Resolution

This error is related to a rare configuration scenario. This issue arises when a DataMapper is initially created as a Turbo Extract, and later its type is changed to Extract. In such cases, the OutputObjectName field on the associated OmniDataTransformItem record may not automatically update to reflect the new type.

As a result, it retains the outdated value (e.g., Turbo Extract) instead of updating to the expected value (e.g., json). During execution​ — especially in Preview mode​ — this mismatch can trigger the following error:
Error: "Cannot invoke \"java.util.Collection.size()\" because \"c\" is null"

This happens because the system attempts to process the output as a collection based on the outdated configuration, which no longer aligns with the DataMapper’s updated behavior.

To resolve the issue, follow these steps:

  1. Identify the affected DataMapper and locate its associated OmniDataTransformItem record in your org.
  2. Manually update the OutputObjectName field value to "json"
  3. Save the changes.
  4. Re-execute the DataMapper in Preview mode to confirm the error is resolved.
Knowledge Article Number

005132428

 
Loading
Salesforce Help | Article