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
JNicJNic 

Deployment problems - IDE

Hey guys... I'm confused. I'm attempting to deploy from my sandbox to production and am running in to inconsistent errors with the process...

 

When I "run all tests" in Salesforce web - everything works fine. I get coverage for everything over 75%, and no failures.

 

When I go into eclipse and sync all my classes, obj, etc... and then r-click>force.com>run tests - everything works as well...

 

However, when I attempt to validate my deployment, I get a these terrible errors:

 

Run Failures: ImacControllerTest.testNewIMAC System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] InstallTicketControllerTest.testInsTkt System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] LocationPrepOrderControllerTest.testLocPrp System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] RequirementControllerTest.testRqm System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] ShipmentControllerTest.testShp System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] TerminalPrepOrderControllerTest.testTrmPrp System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] triggerTestAxnUpdateAfter.testAxnUpdateInsert System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] triggerTestAxnUpdateBefore.testAxnUpdate System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] triggerTestInsTktUpdate.testInsTktInsert System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] triggerTestLocPrpUpdate.testLocPrpUpdateInsert System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] triggerTestShpUpdateAfter.testShpUpdate System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] triggerTestTrmPrpUpdate.testTrmPrpUpdate System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] axnUpdate Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required shpUpdate Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required TrmInAxnUpdate Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required shpUpdateBefore Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required LocPrpUpdate Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required axnUpdateAfter Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required axnUpdateBefore Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required trmPrpUpdate Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required installTicketUpdate Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required shpUpdateAfter Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required Average test coverage across all Apex Classes and Triggers is 25%, at least 75% test coverage is required

 

 All of this is already successfull! What gives?

Why does it not work in deployment when it works in the sandbox?

 

Best Answer chosen by Admin (Salesforce Developers) 
JNicJNic

Hi Rich,

 

There is no real "fix" for this issue, but there is a workaround.

 

I worked extensivly with SF dev support (who were very helpful BTW), and what it came down to was that the IDE at this point is not built to handle large scale deployments of too many components at the same time. 

 

The solution is to deploy different elements of your package in order until it is all complete. I've compiled a list of the components that I had to deploy, and put them in order. (I printed them up and put them on my desk... :P )

 

Anycomponents that you need to deploy that are not on this list, you can probably figure out how to make it work. If not, get in touch with SF support right away, and they'll get it worked out.

 

The list:

 

 

1) Deploy objects:

     Custom, and changes to any others.

     As well as any custom "help pages" (if any)

 

2) Deploy tabs, related documents, Applications

 

3) Deploy Triggers, and test Trigger classes

 

4) Controllers, test controller classes, components, related classes*

 

5)  VF pages

 

6)  Layouts

 

7)  Email templates

 

8) Workflows

 

9)  Reports

 

10) Dashboards

 

 

 

 

*I had trouble with number four... I had to deploy one controller/test controller at a time. It worked, its just slow.

 

 

Good luck!

Let us know if this works for you!

Message Edited by JNic on 02-01-2010 10:19 AM

All Answers

JonPJonP

It is possible someone else has done a deployment at the same time, or that you've submitted multiple deployment requests that are overlapping each other?  If you wait 30 min and try again does it still occur?

 

If that doesn't solve the problem, our developers have asked that you open a support case so they can work with you directly on this issue.

 

Thanks,

Jon

salesforce.com Product Manager 

JNicJNic

Thanks Jon. I've tried again, but still getting the same error.

 

I've opened case 03209342

ConejoConejo

Hi,

 

Is there any resolution or fix for this error? I just had the same errors happen to me when deploying from sandbox to production.

 

Thanks,

 

Rich C.

JNicJNic

Hi Rich,

 

There is no real "fix" for this issue, but there is a workaround.

 

I worked extensivly with SF dev support (who were very helpful BTW), and what it came down to was that the IDE at this point is not built to handle large scale deployments of too many components at the same time. 

 

The solution is to deploy different elements of your package in order until it is all complete. I've compiled a list of the components that I had to deploy, and put them in order. (I printed them up and put them on my desk... :P )

 

Anycomponents that you need to deploy that are not on this list, you can probably figure out how to make it work. If not, get in touch with SF support right away, and they'll get it worked out.

 

The list:

 

 

1) Deploy objects:

     Custom, and changes to any others.

     As well as any custom "help pages" (if any)

 

2) Deploy tabs, related documents, Applications

 

3) Deploy Triggers, and test Trigger classes

 

4) Controllers, test controller classes, components, related classes*

 

5)  VF pages

 

6)  Layouts

 

7)  Email templates

 

8) Workflows

 

9)  Reports

 

10) Dashboards

 

 

 

 

*I had trouble with number four... I had to deploy one controller/test controller at a time. It worked, its just slow.

 

 

Good luck!

Let us know if this works for you!

Message Edited by JNic on 02-01-2010 10:19 AM
This was selected as the best answer
GlennAtAppirioGlennAtAppirio

The previous post is actually NOT the right solution.

 

Please see http://boards.developerforce.com/t5/Apex-Code-Development/UNABLE-TO-LOCK-ROW-error-during-deployment-SFDC-bug/td-p/208792 for the actual root cause and resolution.