3

Attempting to run the following code as anonymous apex generates an error:

public class YoYo{
    String abc;
    Integer i;  
    Double d;
        public YoYo(){

        }
    public YoYo(String abc,Integer i, Double d){
            this.abc=abc;
            this.i=i;
            this.d=d;
        }
}

YoYo t = new YoYo();

Error:
UNKNOWN ERROR: apex.bytecodeinterpreter.InterpreterRuntimeException: Unable to load class: esw/anon$YoYo Error Id: 1024384784-261701 (1978825992)

What causes the error?

  • When I copy + paste this and run it it compiles and executes. – Brian Mansfield Jul 20 '15 at 15:24
  • @Ajay Did you write the code yourself, or cut/paste from another source? – HomerJ Jul 20 '15 at 15:52
  • Do you actually have that class in your org? Go to Setup -> Develop -> Apex Classes to verify it is in the org that you are attempting to execute the script on. – Xtremefaith Jul 20 '15 at 16:44
  • No, I want to try it on developer console. – Ajay Gupta Jul 22 '15 at 5:06
  • Works for me too, where are you running it from, dev console, ide, etc? – CyberJus Aug 5 '15 at 17:52