Wednesday, December 29, 2010

Soltion for error: "The solution cannot be removed when a job is scheduled or running"

if you are getting the following error while deleting solution: The solution cannot be removed when a job is scheduled or running, that means your solution got corrupted while deployment and it is not retractable.
Even if you will see under operation in Central Administration( under "Solution Management"), it will not give you option to retract and it will show error without detail.

Here is the solution to remove corrupted soltuion from sharepoint 2007:

get the job id using enumdeployments
stsadm -o enumdeployments
i.e. job id(2529c788-971c-46a3-b69f-a2a0a1fcc851)

cancel deployment using job id
stsadm -o canceldeployment -id 2529c788-971c-46a3-b69f-a2a0a1fcc851

once job id in step 2 is canceled than retract solution
stsadm -o retractsolution "Yoursolution.wsp" -immediate

once retract is completed than delete solution
stsadm -o deletesolution "Yoursolution.wsp" -override

enjoy green coding using free site

1 comment:

  1. stsadm -o retractsolution "Yoursolution.wsp" -immediate
    stsadm -o deletesolution "Yoursolution.wsp" -override

    should be changed to

    stsadm -o retractsolution -name "flydubai.ess.webparts.wsp" -immediate

    stsadm -o deletesolution -name "flydubai.ess.webparts.wsp" -override