function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
benwrigleybenwrigley 

Internal server error

Hi All,

 

This is a new one for me, I've just hit a repeatable internal server error, but not sure how to debug it!

 

 

An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 1789751736-5504 (393970645) 

 

Has anyone got a sensible way?

 

TIA

 

benwrigleybenwrigley

Ok I have a little more info now.

 

If have a method called loadProduct that seems to crash the server simple by being called.

 

Here is the method that calls it:

 

 

   public ID savePriceBreak(){
        //save a new/edited packageEntry
        

        
        if (isPriceBreakUnique() == false){
        	TMDR_ErrorMessage te = new TMDR_ErrorMessage('pbUnique');
        	TMDR_Exception ex = new TMDR_Exception();
        	ex.addMessage(te.getFriendly());
        	throw ex;
        	
        }
        try {
        	CurrentPriceBreak.save();
        }
        catch (Exception e){
        	throw e;
        }
        
       	
        if (Products == null || Products.containsKey(getProductID()) == false){
        	
            loadProducts();
            
            ID pid = CurrentPriceBreak.getProductID();
            
            //return null;
            loadProduct(pid);
            //return null;	
        	
        }
        
        ID pid = CurrentPriceBreak.getProductID();
        

        if (pid != null){
                loadPriceBreaks(pid);
        }    
            
        return CurrentPriceBreak.getPriceBreak().ID;
   
    }

 You see that I have two comments either side of the call to loadProduct.

 

Uncomment the first and everything is ok.

Comment out the first and uncomment the second and I get the Internal server error

 

So I think it's fair to say the error lies in this method.

 

I've stripped the method back to this:

 

 

    public void loadProduct(ID pid){
    	return;
    }

 

 

And I still get the server error when I call it.

 

This has been working fine up until today.

 

Any ideas?

 

 

benwrigleybenwrigley

Still more confusing. It's not the only line that is erroring.

 

This line of code is also failing now:

 

 

PriceBreaks.put(pb.ID,null);

 

 

PriceBreaks is defined as

 

 

Map<ID,TMDR_PriceBreak> PriceBreaks = new Map<ID,TMDR_PriceBreak>();

 And if I add these lines beforehand

 

 

            	System.Debug('#####DEBUG ' + PriceBreaks);
            	return 0;
                PriceBreaks.put(pb.ID,null);

 

 

Code executes fine and debug is:

 

16:04:10.011|USER_DEBUG|[153]|DEBUG|#####DEBUG {}

 

I'm baffled! Two in one day for code that has been working for weeks.

 

 

 

paul-lmipaul-lmi

http://sites.force.com/ideaexchange/apex/ideaview?id=08730000000JKDpAAO

 

troubleshooting this error is basically trial and error.  have fun.

EJWEJW

Open a case with SFDC and include the error ID.  They can use that ID to look up the actual error in their logs, though there might be a time limit on how long those logs are kept.  I've seen this numerous times in the past.  You might have to get escalated beyond tier 1 before you find someone who knows where to find that info or is willing to look for it.

 

Last time we encountered it was due to trying to access reminder properties of a task in Apex Code when the org had reminders disabled at the org level.