Salesforce.com - Why uploading of Apex class is not working?
-
01-07-2019 - |
Question
I have an Apex class (controller) originally developed under Developer Edition and need to upload it to production which is Enterprise Edition.
The upload fails with following message
classes/RenewalController.cls(RenewalController):An error occurred on your page.
package.xml(RenewalController):An object 'RenewalController' of type ApexClass
was named in manifest but was not found in zipped directory
The same message when I try to use Force.com IDE: Save error: An error occurred on your page.
This class is working under Developer Edition but not with Enterprise.
What can be the problem?
Solution 2
Controller class may reference other custom SalesForce objects like pages. If controller is uploaded before these objects Save error: An error occurred on your page. is reported.
Correct order of uploading of custom components should be used.
OTHER TIPS
Dmytro, you are correct. Visualforce pages, apex classes, and components must be uploaded in the correct order. Generally the pattern I use is upload the controllers, components, and then visualforce pages.