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
MikeD13MikeD13 

Eclipse: Cannot Delete Classes/Triggers in Production

I created a trigger and class in by Sandbox and deployed them to production. Now, I would like to drop the class and trigger in production but I cannot do so. I have attempted using the Apex and Force.com toolkits. The best I have been able to do is comment out the code so they do nothing and then redeploy.

Here's the message from the Apex Toolkit log:
DEBUG [2008-01-22 09:50:38,490 {HH:mm:ss}] (ApexArtifactService.java:compileTestSave:330) - Delete [1] Apex Triggers
 INFO [2008-01-22 09:50:39,787 {HH:mm:ss}] (ApexArtifactService.java:compileTestSave:343) - Compile/save/delete problem was [Test coverage of selected Apex Class and Trigger is 0%, at least 75% test coverage is required]
DEBUG [2008-01-22 09:50:39,787 {HH:mm:ss}] (Markers.java:addWarningMarker:143) - Add warning marker to 'Shea Production'
DEBUG [2008-01-22 09:50:39,818 {HH:mm:ss}] (SalesforceToolkitOnlineBuilder.java:handleDeleteResult:308) - Successful delete of ApexTrigger 'null'
DEBUG [2008-01-22 09:50:39,818 {HH:mm:ss}] (SalesforceToolkitOnlineBuilder.java:handleLocalDeletes:392) - Locally delete file 'trgRentStepChange.tgr'

And from the Force.com log (Not showing full stack track for error... let me know if you need it):

ERROR [2008-01-22 09:39:09,325 {HH:mm:ss}] (RefactorService.java:performRemoteDelete:664) - Unable to perform server delete
com.salesforce.toolkit.remote.ToolkitConnectionException: java.lang.RuntimeException: Failed deployment: UNKNOWN_EXCEPTION msg:null: Cannot complete this operation. Cannot delete classes/triggers in production.  Use compileAndTest verb to delete. : null

Thanks,
Mike
zchenzchen
I had the same problem, no solutions?
Karen WheelerKaren Wheeler
Still no solutions! I just got the same error today. :-( Update from Salesforce???