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

more info on the "the metadata is invalid - delete your class or contact support" message

Getting a "the metadata is invalid - delete your class or contact support" message when recompiling an Apex Code class.
I reported this a few weeks ago but I have more information.  The problem is still there with the latest Eclipse add-in.  I also get the same message if editing code through the web interface.
The problem occurs if you have a class that is global and contains webservice methods or attributes.  It is an intermittant problem, however certian things seem to make it more likely to happen:
   1. if you change the type of one of the webservice methods or attributes.
   2. if you have lots of webservice methods or attributes in a class.
   3. if you have two of such a classes featured in 1 and 2 where one classes uses the other class for its function.
I've had situations where the second recompile of a class will almost always cause this fault.  The first works and the code runs.  Any change to the class (or even recompile without a change) causes the metadata invaid error.
The only fix I've found that works is to delete the class and recreate it straight away from a copy-pasted peice of code.
The problem seems equally bad in both Eclipse and through the web.
Ron HessRon Hess
I'd like to understand if you are running on Winter08, with the ice cube in the logo? or not.

No ice cube yet.  I'm on a developer account on na4.

Ron HessRon Hess
this should get better by monday!

thanks for your patience.


The problem is still there in Winter 08.  At least it is if the code is saved as API 10.0.   Haven't yet seen it if saved as API 11.0.   However the Eclipse add-in always switches the code back to API 10.0.....  So I still have the problem.


Ron HessRon Hess
Got it, understood.
The good news is the Winter 08 Eclipse is scheduled for month end, and that should take care of your issue.

thanks for your patience.