Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to de-reference a null object from RollupJob (as seen on Apex Jobs page) #318

Closed
afawcett opened this issue Mar 16, 2016 · 4 comments

Comments

@afawcett
Copy link
Collaborator

caused by: System.NullPointerException: Attempt to de-reference a null object
Class.dlrs.RollupService.processScheduleItems: line 356, column 1
Class.dlrs.RollupJob.execute: line 48, column 1

Cause: This appears to be caused when using Schedule Mode and having upgraded to v2.0 with existing 'Lookup Rollup Summary Schedule Items' records in place (see corresponding tab). The new field 'Lookup Rollup Summary 2' on this object will not be populated on pre-existing records (new records are fine) and this causes the problem. Add this field to the layout and list view and sort by it to check.

Workaround: is to populate the 'Lookup Rollup Summary 2' field with the value (ID) of 'Lookup Rollup Summary' for each effected record (mass edit on list view is good for this) or delete the effected records and do Calculate to ensure all rollups are updated, then new Lookup Rollup Summary Schedule Items records will have this field populated correctly.

Code Fix is to ensure this code tolerates either the 'Lookup Rollup Summary' or 'Lookup Rollup Summary 2' fields containing a value, not just the new one.

@afawcett
Copy link
Collaborator Author

Fixed v2.3.

@rajarak12
Copy link

I just upgraded from 2.4.2 to 2.11 and started seeing this exception. Also could this issue potentially impact other scheduled jobs? I am looking into it further.

@afawcett
Copy link
Collaborator Author

Thanks @rajarak12 that is odd, this fix seemed to be ok at the time i have not heard of any issues until now. Maybe try the workaround described above? It is also possible its another issue. This will only impact your DLRS scheduled job called RollupJob not any others.

@vseafordACF
Copy link

Hi was there any resolution to this error. I'm on v2.9 and received the following error message for a portion of failed batches.

Failed to process batch for class 'dlrs.RollupJob' for job id '7074600002fNQY7
caused by: System.NullPointerException: Attempt to de-reference a null object
Class.dlrs.RollupService.processScheduleItems: line 380, column 1
Class.dlrs.RollupJob.execute: line 48, column 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants