0

I am trying to update the name of one of the Salesforce Custom Objects, and using Talend Data Integration tool for the same. The action on the salesforce Object is 'Update' and I only have two columns specified in this schema, Id & Name. There are around 1500 records in the Salesforce Object and getting this error when it tries to update the 203rd record.

Getting the below error when I run the Talend Job to update the Name:

Exception in component tSalesforceOutput_1 java.lang.Exception: RollupRefresh_Deal: execution of AfterUpdate

caused by: System.NullPointerException: Attempt to de-reference a null object

Class.Utilities.combineAccountStatistics: line 160, column 1 Trigger.RollupRefresh_Deal: line 61, column 1

at org.talend.salesforce.SforceManagementImpl.update(SforceManagementImpl.java:416) at

===================================================

Status Code: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

RowKey/RowNo: ID# of the 203rd record.

Message: RollupRefresh_Deal: execution of AfterUpdate

caused by: System.NullPointerException: Attempt to de-reference a null object

Class.Utilities.combineAccountStatistics: line 160, column 1 Trigger.RollupRefresh_Deal: line 61, column 1

I tried to filter out NULL ID's/ Name records, but still get the same error as above.

Thanks in advance Sr

1 Answer 1

2

This error doesn't appear to have anything to do with Talend or ETL as such, and it needs to be fixed in your code - not your ETL or your incoming data.

RollupRefresh_Deal is an Apex trigger in your Salesforce organization. You can use the stack trace information in the error report to review the code (line 61 of RollupRefresh_Deal) to determine why your code is trying to dereference an object that is null.

Once you identify the issue, this is a good opportunity to write some unit tests for RollupRefresh_Deal to make sure it doesn't happen again by covering the relevant code and testing with null values.

You can, as you've found, turn off the "all or nothing" setting to allow the other records to go through. However, this error will continue happening until the root cause - the bug in that Apex trigger - is found and fixed.

6
  • yes, saw from the error log that its Attempting to de-reference a null object. And from the code, I have this : private static org.apache.log4j.Logger log = org.apache.log4j.Logger .getLogger(dm_deal__c.class);
    – Sophia
    Feb 6, 2018 at 21:44
  • That doesn't look like Apex. You need to be looking at the code inside Salesforce.
    – David Reed
    Feb 6, 2018 at 21:49
  • The Object I am trying to update is different, so am trying to figure out what the 'RollupRefresh_Deal' is and also what this Status Code means: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
    – Sophia
    Feb 6, 2018 at 21:50
  • RollupRefresh_Deal is an Apex trigger in your Salesforce instance. It threw an exception, causing the CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY error message. You need to work with a Salesforce developer in your organization to fix this.
    – David Reed
    Feb 6, 2018 at 21:52
  • Thanks David for taking time to respond on this. I have unchecked the ' die on error' option on the Talend Salesforce Component and ran the job . The job has updated the record, which was earlier failing with the above error, without any issues in Salesforce. Unfortunately, we do not have any Salesforce Developer on our Team, so trying to figure it out on my own.
    – Sophia
    Feb 6, 2018 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .