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
GaneeeshGaneeesh 

System.LimitException: Maximum stack depth reached: 1001

Hi Please any one can help with solution, i am getting following error,  while writing controller "System.LimitException: Maximum stack depth reached: 1001 ". And this is my controller. May I know what is the Error, why I am getting this erroe and in which cases I am getting this type of error.

public with sharing class jkk_save1_controller {

public contact acc{get;set;}
public jkk_save1_controller(){
acc=new contact();
}

public PageReference savecon() {
return null;
}
}
 
pbattissonpbattisson
The error is caused by having a recursion problem (Salesforce has a limit of 1000 for the number of nested recursions you can perform to stop infinite looping).

Could you post your Visualforce page as this may illustrate where you are getting this error.
ravi chandra ch 7ravi chandra ch 7
It is because your class name and controller name is same.
create a wrapper class.