You need to sign in to do that
Don't have an account?
Justin St Germain
Problem deploying through Deploy tool in Salesforce
I keep getting the following error, and am not sure why. The Apex class I created works in Sadbox and uploads for deployment without an issue, but it fails when I go to "Inbound Change Sents" and try to deploy the new class...
ERROR:
Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Student_Master.ApplicationMasterTrigger: execution of AfterInsert caused by: System.QueryException: List has no rows for assignment to SObject (Student_Master): []", Failure Stack Trace: "Class.App...
ERROR:
Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Student_Master.ApplicationMasterTrigger: execution of AfterInsert caused by: System.QueryException: List has no rows for assignment to SObject (Student_Master): []", Failure Stack Trace: "Class.App...
All Answers
Go through your code again, there's definitely a bug there. Also would help if you clearly state what is going in as part of the change set.
I am not sure what that means exactly. I created an Apex controller class and a page, but was only trying to deploy the class cause I can create the page in production and I didnt see a way to roll it into the deploy... here is the code for the controller...
So, I dont know how I would be calling anything to do with Student_Master. Below is the Apex page I created that uses the controller...
Thanks for your help, I hope you are able to help more.
A. You cannot create the visualforce page in production (only in sandboxes).
B. You should be able to add the VF page to the changeset - just select type "Visualforce Page" from the drop down when creating the changeset.
The cause for your misery seems to be coming from the tests - when you deploy changesets with code to production, Salesforce runs all the test cases in your org. Looks like one of you test cases is bombing - it would help if you could paste the entire stack trace of the error.
b. Click the "Select Tests" button - select all the classes in the window that comes up.
c. Hit "Run"
This will run all your tests. Wait for completion and check if any of the classes have failed.
Also, what else are you trying to deploy as part of your deployment. Any custom objects, or other classes etc. ?
The only thing I myself am trying to deplow is the Apex class that I posted above for the Auto Complete.
In your case, this is what seems to be happening. The AppTrackerTestSuite test case is failing, which is preventing you from deploying your class (even though the two are unrelated).
Click on "View" next to AppTrackerTestSuite, and check the stack trace. If this is what is causing deployment to fail, you should be able to find the error you are getting in it's stack trace.
Let me know.
that is the same code for each error
A question you may have an answer for...
If salesforce runs test cases EACH time that someone deploys, how would it have been deployed prior to me having issues? Does using Eclipse or something other than the salesforce deploy tool bypass the testing?
I know it's frustrating, but that's part of the Salesforce development cycle.
BTW, if this has answered your question, please mark this as answer so I can earn some points :) TC.