+ Start a Discussion
SandrineSandrine 

Deployment | Apex controller does not exsist | Strange ?

Hello,

I have error while deploying VF and Apex from one sandbox to another.

Component Errors
API Name: ACandidatePrint_v2
Type: Visualforce Page
Error Message: Apex class 'PrintController' does not exist

but "PrintController" is available in change set, i am deploying, but i dont get why i have this error
 
Best Answer chosen by Sandrine
Nagendra Prasad ChNagendra Prasad Ch
Even I faced the same issue, I am not sure the exact reason for this, but I can give u the workaround,
Split your changeset into 2 parts.
In the First changeset add Controller and  any dependent components for that VF like objects, controllers, custom labels ... etc.and deploy that changeset first.
Then add VF page in the second changeset and deploy it after changeset 1.

All Answers

Nagendra Prasad ChNagendra Prasad Ch
Even I faced the same issue, I am not sure the exact reason for this, but I can give u the workaround,
Split your changeset into 2 parts.
In the First changeset add Controller and  any dependent components for that VF like objects, controllers, custom labels ... etc.and deploy that changeset first.
Then add VF page in the second changeset and deploy it after changeset 1.
This was selected as the best answer
Mahesh DMahesh D
Hi Sandrine,

Please try to re-compile the class and VF page to make sure that both components are valid.

Now you can deploy both combinedly in one change set.

If that doesn't work then proceed with what Prasad said like first deploy the Controller followed by Visualforce Page.


Please do let me know if it helps you.

Regards,
Mahesh