I cannot reproduce this error yet, but its causing me huge trouble in release and package scenarios. I have a packaged class which implements an Abstract superclass. Sometimes when I refactor this super class and its implementors I get trapped by Compiler errors that show code lines that do NOT exist in the class anymore.

enter image description here

It looks like Salesforce is keeping the latest compilable version in a cache and ignore the changes I made.

Did you see the same and found any workaround?! Normally I delete and undelete the problematic class. But I cannot do this as I am working in a patch org were nothing can be deleted.

Is this a bug introduced by Summer '13?

  • 1
    FYI: I opened a Case (09567853) with Support. Aug 12, 2013 at 8:45

4 Answers 4


The reason this fails is because the class is still has references to code in other classes. The process is tedious but by reincorporating the code that the compilation is complaining about you can get the class to recompile. You then go back and start taking/commenting out one section of code at a time and recompiling each step of the way so that the references get re-stablished.

I am sure this works !!!


I've hit a large number of bytecode caching issues related to managed packages in the last year - in many cases they can be resolved by using the Setup > Develop > Apex Classes > Compile all classes link.

This forces a recompile of all your existing apex, which should clear out any invalid cached copies. Unless you have too many apex classes in your org, in which case this can cause a viewstate limit exception from the system namespace and you'll need to contact support (and preemptivley remind them that the "system" namespace is salesforce and not a visualforce page you control).


Sometimes this can be fixed by removing all code from the Class, saving, then pasting all the code back in. I don't think the issue is new to Summer 13, but I do seem to be hearing about it more recently.


In the past I have been able to fix this by (temporarily) re-creating the old fields or methods that the compiler was looking for.

Then once you have a working version again you can remove the temporarily created API.

Unfortunately I am now facing a case where that worked for some but not all of the errors -- even after recreating a missing method the compiler still says it cannot be found.

  • Try to delete and restore that file. That helps most of the time. Nov 4, 2013 at 10:03
  • Thanks Robert, but unfortunately I can't delete the class as it is part of a managed package and I'm getting the error in a patch org. I can't completely empty it either, since it has previously released global API. I tried renaming the class, or removing all code that wasn't completely essential but no luck with that either... Did you ever get a response on the support ticket you opened? I opened one too but it's still pending. Nov 4, 2013 at 17:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .