5

I'm trying to work through translating a lot of code and getting classes compile and save to server, however, the IDE doesn't report the name/line of a dependent class, instead I get:

Save error: Dependent class is invalid and needs recompilation: 

Which isn't helpful at all, however, I am also now receiving unexpected compilation errors:

Save error: An unexpected error occurred. Please include this ErrorId if you contact support...

Has anyone else received this type of unexpected error when compiling classes, and know what caused it?

2 Answers 2

4

Did you change the name of or delete a method or class variable recently? It may be that there is a class or trigger still pointing to that old name. To check any particular class or trigger, try to save it in Eclipse IDE. You will receive an explicit error that should indicate what's missing. Most likely, you'll immediately know what happened, once you have that info.

6

I've seen this happen, if an update of one class breaks the integrity of another class. Which class is broken is not communicated quite well in the error messages you receive, this could give you a better clue about where to look:

Log in to SFDC and go to setup-->develop-->apex classes and click the "compile all classes" link around the top of the page.

1
  • 2
    That's good advice. Also worth noting is that there may be more than one offending file but the compilation failure may only list one at a time, so you just have to keep compiling, refreshing the page, compiling, refreshing the page, etc. until there are no more errors. Sep 25, 2012 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.