HTMLCHECKERLib.XMLPProcessorClass The form template failed to load

Lists that use InfoPath for the display and edit forms were randomly producing errors. It was randomly happening because, one of the WFE servers in the farm was out of sync.

To test, I logged into each WFE, then tried to display the list forms. Testing worked on one box but failed on the other.

From the WFE that was not displaying the forms, I ran the following command.

From the start menu, locate the Command Prompt icon, right click on it, then click on Run as administrator. One the command window opens, paste in the command below.

regsvr32 “C:\Program Files\Common Files\Microsoft Shared\OFFICE14\htmlchkr.dll”

This will not cause an IISreset.

Couple of the errors in the log.

10/18/2013 09:05:28.16 w3wp.exe (SPW2:0x46DC) 0x2D30 InfoPath Forms Services Maintenance 82fv Critical The form template failed to load. (User: domain\user, Form Name: Template, IP: , Request: http://sharepointed.com/site/Lists/listname/blah.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:list:-AutoGen-2012-11-28T21:23:23:720Z, Type: InvalidCastException, Exception Message: Unable to cast COM object of type ‘HTMLCHECKERLib.XMLPProcessorClass’ to interface type ‘HTMLCHECKERLib.IHTMLtoXHTML’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{A260B372-BC78-441B-8764-D0B83F4004F4}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).) 9130d182-80de-4da7-96d6-b2a566aea3e7
• 10/18/2013 09:05:28.18 w3wp.exe (SPW2:0x46DC) 0x2D30 InfoPath Forms Services Runtime 8gec Exception Unhandled exception when rendering form System.InvalidCastException: Unable to cast COM object of type ‘HTMLCHECKERLib.XMLPProcessorClass’ to interface type ‘HTMLCHECKERLib.IHTMLtoXHTML’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{A260B372-BC78-441B-8764-D0B83F4004F4}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)). at HTMLCHECKERLib.XMLPProcessorClass.Convert(String bstrHTML) at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventRichTextChange.HtmlToCleanXHtml(String html, Boolean makeDomCompatible) at Microsoft.Office.InfoPath.Server.SolutionLifetime.ItemFieldConnectorRichText.WriteValueNode(ListField fieldInformation, XmlWriter resultWriter, Object value) at Microsoft.Office.InfoPath.Server.SolutionLifetime.ItemFieldConnectorRichText.WritePropertyFromItem(Context context, ResultListItem listItem, XmlWriter resultWriter, ListField fieldInformation, String itemFieldsNamespacePrefix, String itemFieldsNamespace) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.PopulateXmlForMultipleItems(Context context, ResultListItemIterator listItems, Dictionary`2 existingFields, Int64& auxDomSize) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.PopulateXmlForSingleItem(SPListItem listItem, SPListItemVersion currentVersion, XPathNavigator resultFields, Dictionary`2 existingFields, Document document, Int64& auxDomSize) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.LocalListItemQuery(SPContentTypeId contentTypeId, Document document, XPathNavigator resultFields, Boolean& needRegenerateChoice, Dictionary`2& existingFields, Int64& auxDomSize) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.Execute(String siteUrl, Guid listId, SPContentTypeId contentTypeId, Document document, DataAdapterListDataProvider documentAdapter, Boolean useDcl, XPathNavigator queryFields, XPathNavigator resultFields, Boolean isListItemEditing, Boolean discoveryOnly, Int64& auxDomSize) at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterListDataProvider.ExecuteInternal(XPathNavigator queryFields, XPathNavigator resultFields, Boolean useListItemMode) at Microsoft.Office.InfoPath.Server.SolutionLifetime.RulesActionQueryListItem.ExecuteRule(Document document) at Microsoft.Office.InfoPath.Server.SolutionLifetime.RuleAction.EvaluateExpression(Document document, XPathNavigator currentTarget) at Microsoft.Office.InfoPath.Server.SolutionLifetime.RulesRuleSet.EvaluateExpression(Document document, XPathNavigator targetNavigator) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.FireRulesHelper(Boolean onLoadRules) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.PerformOnLoadEvent(Dictionary`2 intputParameters) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.LoadSolutionAndDocument(HttpContext context, Solution solution, DocumentMetaInformation documentMetaInformation, OnInitializeCallback onInitializeCallback, OpenParameters openParameters) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.OpenDocumentWithSolution(HttpContext context, SPSite contextSite, Solution solution, DocumentMetaInformation documentMetaInformation, OnInitializeCallback onInitializeCallback, OpenParameters openParameters) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.NewFromSolution(HttpContext context, SPSite contextSite, Solution solution, DocumentMetaInformation documentMetaInformation, Boolean disableFirstRequestOptization, OnInitializeCallback onInitializeCallback, OpenParameters openParameters) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.DataBindInternal(SolutionMetaInformation solutionMetaInformation, DocumentMetaInformation documentMetaInformation, String absoluteSolutionLocation, Boolean hasCloseHandler, Document& document) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.StartNewEditingSession() at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.EnsureDocument(EventLogStart eventLogStart) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.<>c__DisplayClass8.b__5() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) 9130d182-80de-4da7-96d6-b2a566aea3e7