+ Start a Discussion
Kyle HalstvedtKyle Halstvedt 

Cannot save Apex class - Failed to create deployment


When I attempt to save any changes to any Apex class from the Developer Console in a Sandbox instance, I get this error:

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: Failed to create deployment: entity type cannot be inserted: Container Async Request
User-added image

Does anyone know what's going on?
Deepak Kumar ShyoranDeepak Kumar Shyoran
Normally the issue comes Test class and a way to get rid of that is to disable parallel testing from Setup's "Apex Test Execution" page there is an "Options" button that includes a "Disable Apex Parallel Testing" checkbox. Checking that will probably avoid the problem.

Please mark this post as a best solution to your problem to help others.
Kyle HalstvedtKyle Halstvedt
Thanks, Deepak, for the response. However, I have already disabled Parallel Testing, and this occurs not during testing but saving. Any other ideas? I can also confirm that my account has Apex Author permission.
David "w00t!" LiuDavid "w00t!" Liu
I'm actually shocked that someone is using the dev console for writing code! It's not a bad thing it's just not common yet!

I am assuming you know that you can write classes from the web UI, Eclipse, MavensMate etc etc as well. The easiest of those would be the UI - just navigate to Setup >> Develop >> Apex Classes. Otherwise I don't know if I can help you!
Kyle HalstvedtKyle Halstvedt
Hi, David... good thoughts. I was going to try the Eclipse plugin (ugh), but my sandbox refresh came up, and I was able to resolve the issue by simply refreshing it again. Sidenote: the dev console is quite good :).
lssue occurs in sublime with mavensmate... using the dev console to modify a class compiles in the same way. 
Suresh RaghuramSuresh Raghuram
I know this is a very old post, but leaving a thread in hope to help some one  come across this issue.
I am able to overcome this issue by changing the browser from Chrome to IE.