A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Monday, October 22, 2007

A deployment or retraction is already under way for the solution ... Publishing InfoPath form

You get this error when you try to publish an already published InfoPath form in SharePoint:
"A deployment or retraction is already under way for the solution ..."
If you go into the event log, you will notice different error messages related to this event. For example, one message will be as following:
EventType ulsexception12, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4 microsoft.office.infopath.server, P5 12.0.4518.0, P6 4541816a, P7 12961, P8 161, P9 nullreferenceexception, P10 8gec.
Another will look like the following:
An exception occurred during loading of business logic. (User: ServerAdministrator, Form Name: Teachers, IP: , Request: http://Server/_layouts/Formserver.aspx?XsnLocation=http://server/FormServerTemplates/teachers.xsn, Type: FileNotFoundException, Exception Message: Could not load file or assembly 'file:///C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TemplateFeaturesFT-01-08f7ce0d-e5ba-7eab-8b14-ac2eb94f1addTeachers.dll' or one of its dependencies. The system cannot find the file specified.)
For more information, see Help and Support Center at
Now both these messages are misleading. The first one shows a "nullreferenceexception" and the other one mentions a missing file or dependency. Because of these messages I wasted time in trying to resolve the "nullreferenceexception" error but later it turned out that somehow the form didn't get published properly the first time we published it in SharePoint. Now when we were trying to republish the form but SharePoint was giving us errors. On each attempt SharePoint threw a new error message. One thing that I noticed was that the publishing process stopped the "Windows SharePoint Services Administration" service which was one of the reasons we were unable to republish the form. So check services and start this service if it's stopped and then run the following command:
stsadm -o execadmsvcjobs
If you try to publish the form without starting the "Windows SharePoint Services Administration" service, you will get the following error:
"The timer job for the operation has been created. However, it cannot be run because the administrative service for this server is not enabled."
So start the service and run the stsadm command. This will publish your form and hopefully, you will get rid of the error that said that there was a "nullreferenceexception" in your form. If you still get the same error (A deployment or retraction is already ...) then try running the following command to cancel the deployment that was started earlier:
stsadm -o canceldeployment -id <Timer Job ID>
Timer Job ID can be copied from "Central Administration > Operations > Timer Job Definitions" page. See the most recently created job, you can also verify by looking at the title. Right click the "Job" link and copy the URL. Locate the "JobId" parameter in the URL, this parameter contains the ID.