You need to sign in to do that
Don't have an account?
Irene Sless
Internal Salesforce Error
I have a batch job which used to run fine, but since end of last week is throwing an error: 'FATAL ERROR Internal Salesforce Error' every time.
Developer script from .... exception : 'OrderItemCleanup' : common.exception.SfdcSqlException: ORA-20145: ORA-06512: at "DOPEY.BORDERITEM", line 1830 ORA-06512: at line 1 SQLException while executing plsql statement: {call bOrderItem.check_delete_o...
Apex script unhandled exception by user/organization: .../...
Failed to process batch for class 'OrderItemCleanup' for job id '7079000005qLkrQ'
It's a batch job that runs through existing OrderItems and deletes those of a certain type, then updates the parent Order with text and a roll-up summary field.
I tried to log a case but it seems I can't do so anymore, and am directed to the Community here. Having read other posts, it seems to be something I need to log with SF, but I can't.
Developer script from .... exception : 'OrderItemCleanup' : common.exception.SfdcSqlException: ORA-20145: ORA-06512: at "DOPEY.BORDERITEM", line 1830 ORA-06512: at line 1 SQLException while executing plsql statement: {call bOrderItem.check_delete_o...
Apex script unhandled exception by user/organization: .../...
Failed to process batch for class 'OrderItemCleanup' for job id '7079000005qLkrQ'
It's a batch job that runs through existing OrderItems and deletes those of a certain type, then updates the parent Order with text and a roll-up summary field.
I tried to log a case but it seems I can't do so anymore, and am directed to the Community here. Having read other posts, it seems to be something I need to log with SF, but I can't.
All Answers
If possible can you paste your code here.
These kind of issue occurrs when you have bunch of records in the batch and one of the record fails as part of processing in the trigger context. To resolve this, would like to see the Batch Apex code so that it will be easy to provide the options. But at this point:
Reduce the batch size while calling the batch job in scheduler and see how it is working.
Also look into below similar posts:
https://developer.salesforce.com/forums/?id=906F0000000Au0TIAS
https://developer.salesforce.com/forums/?id=906F0000000ApG6IAK
https://developer.salesforce.com/forums/?id=906F000000091enIAA
http://salesforce.stackexchange.com/questions/89618/internal-salesforce-com-error-in-a-query-inside-a-batch
http://salesforce.stackexchange.com/questions/33629/spontaneous-internal-salesforce-com-error-what-do-i-do
These posts may not solve the issue but just FYI.
Please do let me know if it helps you.
Regards,
Mahesh
Thanks for your response. The query returns 2514 rows. Batch size is 200 at the moment, but I'll try it with 50. This is my batch code:
Here we need to consider few things:
Option 1:
As you are using multiple DML operations, I would recommend to go with 1 or 2 record as a batch and proceed. But it all depends on how many records you are expecting in every batch schedule. If the number of records are 100 / 200 then you can proceed with this option.
Option 2:
You can start using the Database class and its methods for performating the DML oprations with the falg as false but this may create inconsistent data as first operation may success 100% but the second one may not success 100% which will makes the data inconsistent.
Option 3:
Look all possible exceptions and handle them properly before proceed with the DML operations.
Option 4:
Add exception handling for all the DML operations.
Please do let me know if it helps you.
Regards,
Mahesh
Glad you were able to fix the issue and please mark it as solved so that it will be helpful for others in the future.
Regards,
Mahesh