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
gregsgregs 

UNKNOWN_EXCEPTION: An unexpected error occurred when deploying apex classes

I am trying to deploy some updated and new Apex classes to a sandbox using an ant script.  The initial deployment worked perfectly with no errors, however, when i try to deploy a new class and an updated class it causes the following error:
 
C:\Users\devuser\Documents\dev\devDeploy>ant deployCode > deployCodeLog.txt
 
BUILD FAILED
C:\Users\devuser\Documents\dev\devDeploy\build.xml:45: UNKNOWN_EXCEPTION msg: While running test DevActionTest - UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1874638991-94 (637441531)
 
What is causing this error?  How can I determine what is going wrong?  The error is complaining about a test class that runs perfectly fine by itself or with all other classes when running all tests in the UI or all tests through the ant deployment script.


Message Edited by gregs on 11-19-2008 07:00 PM
JonPJonP
Please contact salesforce.com customer support and provide the server ErrorId so they can find out what happened.

Thanks,
Jon
salesforce.com Product Manager
gregsgregs
Thanks very much the suggestion.  I did that as well, but was wondering if there is a general way to debug these kinds of issues or why they typically occur in case it is an error in some unit test code i wrote... Any ideas besides filing the case with support?  Thanks
JonPJonP
No, the UNKNOWN_EXCEPTION message is generally something we have to fix on our end.