Activity › Forums › Salesforce® Discussions › Why am I facing Internal Salesforce.com Error in Salesforce?
Tagged: Database Update, Error Notification, Internal Server Error, Salesforce Apex Code, Salesforce Batch Apex, Salesforce Error, Salesforce Force.com
-
Why am I facing Internal Salesforce.com Error in Salesforce?
Posted by Chinna Sfdc on November 23, 2016 at 9:39 AMHi All,
We are facing Internal salesforce.com error, when we are Running the Batch Apex. Can any one please help us to stop this error.
Thanks
Avnish Yadav replied 7 years, 8 months ago 3 Members · 2 Replies -
2 Replies
-
Hi Chinna Sfdc,
Can you share your batch then only we can able to rectify the error?
Thanks
- [adinserter block='9']
-
Unfortunately, “Internal Server Errors” are VERY difficult to debug. They typically involve a call into Salesforce to look up a “Gack” (only a few internal Salesforce employees have the ability do do this). Even when they’re able to lookup the Gack, it’s not always evident what the root cause is.
However, if I were you, I would start with stripping out much of your batch class and then start adding pieces back in one by one into your batch class, so that you can narrow down the culprit.
For instance I would check the following:
1) Does the batch class work with just the query and a simple system.debug(batch);
2) Does the batch class work with just theq query, a simple system.debug, and adding the batch opportunities to a list?
3) Does the batch class work with just the query, system debug, adding to the list and doing an update lstOpp?
4) Does the batch class work with the query, system debug, adding to the list, and doing the partial processing?After looking at your code though, it looks like it *may* be that you’re using a member variable in your batch class when you don’t need to. I suspect that this is the exception you’re running into, although it could also be the fact you’re using partial processing (Database.update(list,false)).
Log In to reply.