Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

After having my Developer Console not be able to save a class that I edited, I faced this error message when trying to edit/save the class directly in the browser:

Organization Administration Locked

"The changes you requested require salesforce.com to temporarily lock your organization's administration setup. However, the administration setup has already been locked by another change. Please wait for the previous action to finish, then try again later."

Any idea what is causing this and/or what I can do to fix it?

Thanks!

share|improve this question
    
Are you running large numbers of tests, or deploying code? –  Wes Nolte Feb 19 '13 at 21:15
    
Neither, just trying to save a few classes and a VF page that I was working on in a Developer Org. No test classes were involved at all. –  jackerman09 Feb 19 '13 at 21:25
    
did you or someone else logged in click run all tests? –  Tanuj Feb 19 '13 at 22:11
    
No, this did not happen after even a single test was run –  jackerman09 Feb 20 '13 at 1:48
    
This happens to me very occasionally for "no reason". In all cases it's resolved itself in under an hour, so I'd copy-paste your code changes and keep trying periodically. 95% of the time I see this message, it's because someone else has hit run all tests or is running a long-running unit test, but I have seen it happen for no apparent reason. Never had it hung for more than a few minutes if it's not run-all-tests-related. –  jkraybill Feb 20 '13 at 4:53

4 Answers 4

This usually means:

  1. Something is being deployed via API (check Setup -> Monitor Deployments)
  2. Something is being deployed via changesets (Setup -> Deploy -> Inbound change sets)
  3. You're running some unit tests.

Your request (from developer console, Eclipse or whatever) might have been canceled / timed out but the deployment still runs. One of these means should give you a hint what's going on.... You might also check setup aoudit trail if the condition persists.

If your class failed to save but it seems to be still checking - maybe you've modified something "big". Will many visualforce pages / apex clases that rely on this class suddenly become invalid because you deleted a lot? In that case it might be worth a while to help SF dependency checker by commenting out majority of these VF classes before saving your main change...

share|improve this answer
    
I am neither deploying anything or running unit tests. I was just trying to save a few classes and a VF page that I was working on in a Developer Org. No test classes were involved at all. It is possible that the class that I saved affected several other classes that I was not actively working on, however, shouldn't I still be able to save my work? –  jackerman09 Feb 19 '13 at 21:27
    
Still, can you check these setup areas (especially "monitor deployments"). I've never edited a class from Dev Console but it shouldn't be too different from editing Apex class from web interface - and that can be seen both in "monitor deployments" and debug logs. –  eyescream Feb 19 '13 at 21:30
    
As a side comment, this can also happen if you are working with multiple developers and they save a class at the same time. –  Jesse Altman Feb 19 '13 at 21:37
    
Thanks for the input. I checked 'monitor deployments' and it is empty. Additionally, I was not working with multiple developers, but I was trying to save multiple classes within a few seconds of each other (I was working on a few tabs at once in the Dev Console). I also tried resaving a class that froze up the first time, which probably didn't help, but I still don't know why it froze to begin with. –  jackerman09 Feb 19 '13 at 21:47

I've experienced this. It has ALWAYS been a situation where dev console doesn't like something about a dependency...crAzy annoying that it won't tell you which one.

Best solution is to open up all the referenced components, composition templates, classes, classes with methods called by those classes, etc. add a space somewhere and resafe...dev console will fuss about one of them. Fix that, and you fix the problem.

Note...there likely nothing officially wrong with your code. The ones I've had would save out of IDE or the develop>classes edit. It's something specific that dev console doesn't like.

share|improve this answer

A circular dependency between a Page and Controller will produce your exact symptoms, but I'd raise a case to Salesforce. There are reasonable situations where this may happen inadvertently:

Jackerman.page

<apex:page controller="JackermanController">
  <apex:form>
    <apex:commandButton value="Create new Contact then come back" action="{!doRedirect}" />
  </apex:form>
</apex:page>

JackermanController.cls

public class JackermanController {
  public PageReference doRedirect() {
    String retUrl = Page.Jackerman.getUrl();
    return '/003/e?' + retUrl;
  }
}

In that example, one could do new PageReference('/apex/Jackerman').getUrl() to remove the compile-time dependency from the Apex class... unless your org is locked, that is ;-)

share|improve this answer

This may not be your issue, but I've had instances where a pending deployment got stuck and locked out the org completely. Usually this resolves itself in a day, but if it doesn't you can contact support to unstick it.

share|improve this answer
    
Thanks, hopefully it's cleared up by tomorrow. I hadn't run any deployment, just tried to save a few classes –  jackerman09 Feb 20 '13 at 1:49
    
Hope that cleared it up. Fyi, saving a class is just a single file deployment, so it's not unrealistic that something may have gotten locked up underneath the covers. Probably goes without saying, but that means if you save a production apex class you'll have to wait until all tests have run until you can make another change, sandbox is just faster since they don't run test. –  Ralph Feb 21 '13 at 0:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.