+ Start a Discussion
JitendraJitendra 

Not able to save anything from eclipse IDE

Hi,

Before one day everything was working fine.

 

But today i am getting strange problem in eclipse. I am not able to save anything to the sales force but i am able to synchronize with server,even i am able to use salesforce schema window.

 

If i change only one space in existing code, still it shows an error unable to save. IN short i am not able to change anything on server i can only read.

 

Please help to verify the problem. I am the system administrator in salesforce and therefore i have permission to use force IDE.

 

Best Answer chosen by Admin (Salesforce Developers) 
JonPJonP

Is your project connecting to a production Salesforce organization?  Or a Sandbox / Developer Edition organization?

If it is production, for any type of deployment (save, deploy to server, synch) to succeed your organization must meet Apex code coverage requirements and all tests must pass.  These requirements will be checked each time you deploy.

One common source of this problem is if you have added a new validation rule.  Most Apex tests create temporary data used to exercise the code in Apex classes and triggers.  A validation rule, if unmet by the insert/update logic in your test classes, would cause tests that previously passed to now fail, without you having actually changed the code itself.

Unfortunately, the side affect of a situation like this is that you can no longer change anything via the Metadata API because deployments will be aborted if any Apex test is failing.

The easiest way to find out if you have failing Apex tests in your organization is to point your browser to the Apex Classes page under setup and click Run All Tests.  From there you can see what's failing and trace it to the root cause, whether a validation rule or something else.

I've made a lot of assumptions here, so the problem you're experincing could very well be something different.  But if these suggestions don't get you back on track, please provide more information about what you're doing and in particular what changes have been made to your Salesforce organization or development environment over the last few days that could be contributing factors.

 

Jon

salesforce.com Product Manager

Message Edited by JonP on 02-19-2009 09:37 AM

All Answers

JonPJonP

Is your project connecting to a production Salesforce organization?  Or a Sandbox / Developer Edition organization?

If it is production, for any type of deployment (save, deploy to server, synch) to succeed your organization must meet Apex code coverage requirements and all tests must pass.  These requirements will be checked each time you deploy.

One common source of this problem is if you have added a new validation rule.  Most Apex tests create temporary data used to exercise the code in Apex classes and triggers.  A validation rule, if unmet by the insert/update logic in your test classes, would cause tests that previously passed to now fail, without you having actually changed the code itself.

Unfortunately, the side affect of a situation like this is that you can no longer change anything via the Metadata API because deployments will be aborted if any Apex test is failing.

The easiest way to find out if you have failing Apex tests in your organization is to point your browser to the Apex Classes page under setup and click Run All Tests.  From there you can see what's failing and trace it to the root cause, whether a validation rule or something else.

I've made a lot of assumptions here, so the problem you're experincing could very well be something different.  But if these suggestions don't get you back on track, please provide more information about what you're doing and in particular what changes have been made to your Salesforce organization or development environment over the last few days that could be contributing factors.

 

Jon

salesforce.com Product Manager

Message Edited by JonP on 02-19-2009 09:37 AM
This was selected as the best answer
JitendraJitendra

Hi,

 

I have checked test coverage and its already 78%.

 

Even i am not able to create new Apex class or trigger. and its Advanced enviornment.

 

I have anather project in eclipse for SandBox and its running fine.

 

Please help in this issue. 

JitendraJitendra

Thanks Jonp,

 

Although test coverage was 78% but two tests were failed and thats why problem.

I have resolved this.