Generate Compile Data Job Failures

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.

  1. 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__c records have invalid or corrupted JSON in the vlocity_cmt__ActionParameters__c field, such as missing brackets, incorrect array format, or unescaped quotes.

    Resolution

    1. Run this query to check for Product Relationships with Action Parameters:
      select vlocity_cmt__ActionParameters__c from vlocity_cmt__ProductRelationship__c
    2. Copy the ActionParameters__c values and validate the JSON syntax that uses a JSON validator.
    3. Correct any errors in JSON.
    4. Rerun the Generate Compile Data job.
  2. 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

    1. 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
    2. Go to Rulesets on the Vlocity Product Console.
    3. Populate the RuleType and RulePurpose for each rule.
    4. Rerun the Generate Compile Data job.
  3. 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__c field on Product2 records contains malformed JSON.

    Resolution

    1. Run this query to identify products with AttributeMetadata.
      SELECT Id, Name, vlocity_cmt__AttributeMetadata__c FROM Product2
    2. Review the AttributeMetadata JSON for malformed structure, for example, a missing Attribute category.
    3. Correct the JSON syntax or data.
    4. Rerun the EPC job.
  4. 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__c records with missing or null Product ID or ProductGroupKey__c.

    Resolution

    1. 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
    2. Correct the missing Product2Id__c or ProductGroupKey__c.
    3. Rerun the maintenance jobs and execute the Generate Compiled Data EPC job.