Identify and resolve common Generate Compile Data job failures caused by data issues such as JSON parsing errors, null rule fields, and missing Price Book Entry records.
-
Resolve Product Relationship JSON parsing errors.
Issue
The Generate Compile Data job fails with JSON parsing errors. Here's an example of the error.
"Unexpected character (',' (code 44)): was expecting a colon to separate field name and value at [line:1, column:86]"Cause
Check if
vlocity_cmt__ProductRelationship__crecords have invalid or corrupted JSON in thevlocity_cmt__ActionParameters__cfield, such as missing brackets, incorrect array format, or unescaped quotes.Resolution
-
Run this query to check for Product Relationships with Action Parameters:
select vlocity_cmt__ActionParameters__c from vlocity_cmt__ProductRelationship__c -
Copy the
ActionParameters__cvalues and validate the JSON syntax that uses a JSON validator. - Correct any errors in JSON.
- Rerun the Generate Compile Data job.
-
Run this query to check for Product Relationships with Action Parameters:
-
Resolve Context Rules with Null RuleType or RulePurpose.
Issue
The Generate Compile Data job fails with statusCode: 400 at ApexCompileRules step.
"statusCode":400,"statusMessage":"500.ApexCompileRules.001 : Internal Server Error - Attempt to de-reference a null object"Cause
Check if Context rules have empty Rule Type or Rule Purpose fields.
Resolution
-
Run this query to identify rules with null RuleType or RulePurpose:
select Id, vlocity_cmt__RuleType__c, vlocity_cmt__RulePurpose__c from vlocity_cmt__Rule__c where vlocity_cmt__RuleType__c = null or vlocity_cmt__RulePurpose__c = null - Go to Rulesets on the Vlocity Product Console.
- Populate the RuleType and RulePurpose for each rule.
- Rerun the Generate Compile Data job.
-
Run this query to identify rules with null RuleType or RulePurpose:
-
Resolve Malformed AttributeMetadata JSON in Product2.
Issue
The EPC Generate Compiled Data job fails with a "Too many query rows: 50001" error.
Cause
Check if the
vlocity_cmt__AttributeMetadata__cfield on Product2 records contains malformed JSON.Resolution
-
Run this query to identify products with AttributeMetadata.
SELECT Id, Name, vlocity_cmt__AttributeMetadata__c FROM Product2 - Review the AttributeMetadata JSON for malformed structure, for example, a missing Attribute category.
- Correct the JSON syntax or data.
- Rerun the EPC job.
-
Run this query to identify products with AttributeMetadata.
-
Resolve Price Book Entry not found after running Generate Compile Data.
Issue
Generate Compiled Data EPC job fails silently at Step 5 (Compile Product Hierarchy) with "Price Book Entry ID not found" error.
Cause
Check if
vlocity_cmtProductRelationship__crecords with missing or null Product ID orProductGroupKey__c.Resolution
-
Run this query to identify ProductRelationship records with missing Product ID or
ProductGroupKey__c.SELECT Id, vlocity_cmt__Product2Id__c, vlocity_cmt__RelatedProductId__c FROM vlocity_cmt__ProductRelationship__c WHERE vlocity_cmt__Product2Id__c = null OR vlocity_cmt__ProductGroupKey__c = null -
Correct the missing
Product2Id__corProductGroupKey__c. - Rerun the maintenance jobs and execute the Generate Compiled Data EPC job.
-
Run this query to identify ProductRelationship records with missing Product ID or