---
schema_version: "1"
id: 1aaf466977b8ef3888115a67d5236355ca273e1f1911581e9756281035134a82
title: Generate Compile Data Job Failures
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_generate_compile_data_job_failures.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_generate_compile_data_job_failures.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1b0fc2e7dd68e9e4b088200f3b23d61cfa7e86f6b9852ca3710540b238f343ed
description: 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.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# 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.
    
    ```sql
    "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:
        
        ```sql
        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.
    
    ```sql
    "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:
        
        ```sql
        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.
        
        ```sql
        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`.
        
        ```sql
        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.