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
MTBRiderMTBRider 

Save Errors when using Eclipse

Somehow my development environment has gotten into a bad state.  I am working on a VF page and a custom controller (using Eclipse).  Whenever I try to save my controller I get the following message:

 

 
Save error: Conflict found while preparing to save 'controller.cls' to server.  Remote instance has been updated since last save or sync.  Use the Synchronize Perspective to resolve the conflict.   

 

I am also getting save errors when trying to save the VF page in Salesforce.  

 

I have tried deleting all the VF pages and the controller class that is on the server and resaving everything again, but after a few saves, I start to get the errors again. 

 

I cannot find the Synchronize Perspective function in Eclipse that the error message refers to.

 

Any ideas?  Maybe a time drift issue between my laptop and SF server?

Best Answer chosen by Admin (Salesforce Developers) 
MTBRiderMTBRider
So...I have not built VF pages for a little while.   I use to use the SF browser to edit the VF code and eclipse for the apex classes without this out of sync thing.  Has this changed?  Should I now use Eclipse for both the Apex and the VF code?

All Answers

WesNolte__cWesNolte__c

Hey

 

This usually happens if you code within the IDE and within the browser(there are some exceptions). In all cases if you right click on the file the error message mentions and choose "Synchronise with server" you will get the Sync Perspective. If you know your local file is the correct version and you want to skip this process you can also right-click on the file(s) and choose 'Save to server'.

 

Cheers,

Wes

JonPJonP

Note that "Synchronize with Server" and "Save to Server" are under the "Force.com" context menu.  So you'd right-click on a project folder or file and choose Force.com > Synchronize with Server.

 

MTBRiderMTBRider
So...I have not built VF pages for a little while.   I use to use the SF browser to edit the VF code and eclipse for the apex classes without this out of sync thing.  Has this changed?  Should I now use Eclipse for both the Apex and the VF code?
This was selected as the best answer
arunkarunk

Hi,

 

 

U can use eclipse or browser to edit VS and APEX files.

Both have there advantages and shortcomings.

But mostly it a matter of personal preference.

 

Regards,

Arun 

JonPJonP

As the previous poster wrote, it's a personal preference thing.  Editing directly in the browser has the advantage that you can save and refresh the page with a single click, and the current IDE release (Summer '09 / v16.0) does not yet offer code assist for Visualforce.  On the other hand, the IDE makes it easier to move between multiple files, for example if you're editing a VF component and the pages that use it.

 

Regarding the sync issues, I think you'd agree that it's correct for the IDE to raise a warning when its local copy of the file is older than what's in your org.  The one thing that isn't obvious about the browser VF editor is that when you save your page, it also saves your custom controller, even if you haven't made any changes.  The IDE just compares the last update times, for reasons of efficiency, but the result is that even if you only have your Apex classes in the IDE and you aren't editing them in the browser, you still may see some out of sync warnings.

vsabbellavsabbella
Some how I do not get the save error in my eclipse IDE. I have overwritten the code several times while the other developer is using the browser to update the code. Do you guys know why I do not get the save error when file in salesforce is upated??
Thanks in advance
sankalita chatterjeesankalita chatterjee
Hey Ramforce.. I have exactly the same issue and am still searching for it ! ... do let us know if you get a solution.
vsabbellavsabbella
I still did not get a solution. I downloaded the eclipse binary. That might probably be the issue.
sankalita chatterjeesankalita chatterjee
It is an issue in Eclipse Plug In : https://github.com/forcedotcom/idecore/issues/66