Error: [COMException (0x80040e14): Exception from HRESULT: 0x80040E14]

Posted Wednesday, November 4, 2009 4:05 PM by CoreyRoth

Ah, don’t you love COMExceptions?  Recently, I was adding two new site columns to a list and encountered a whole slew of errors when trying to create new items in the list.  This is the error I got when I was trying to create a custom folder.

System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040E14
[COMException (0x80040e14): Exception from HRESULT: 0x80040E14]
   Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +0
   Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +203

This is the error when I tried to check in a document.

[COMException (0x81020030): The URL 'Lists/MyList/MyDocument.docx' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.]
   Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +0
   Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +203

Lastly, this is the error I got when trying to save a document from Microsoft Word after using the New Document command.

The internet address ‘http://moss-server/Lists/MyList/MyDocument.docx’ is not valid.

Wow!  That’s a whole lot of different errors that all are stemming from the same issue.  What’s the issue? Well after some quick Google research, I knew it had something to do with duplicate columns.  I just added two new columns, so I knew where to start.  In this case, I cut and paste one column and changed the values of the DisplayName, Name, and StaticName columns as well as the Id.  I figured that should be good, but that was not the case.  Look at my two columns and see if you can spot the issue.

<Field Type="Text" DisplayName="MyField1" Required="FALSE" MaxLength="255" Group="Custom" ID="{8e62a2e4-20b9-4689-b379-4674db156b25}" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="MyField1" Name="MyField1" Customization="" ColName="nvarchar20" RowOrdinal="0" />

<Field Type="Text" DisplayName="MyField2" Required="FALSE" MaxLength="255" Group="Custom" ID="{C133215B-053A-4a31-BD1E-724140A4663D}" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="MyField12" Name="MyField2" Customization="" ColName="nvarchar20" RowOrdinal="0" />

Everything might look ok at first, but it won’t look ok if you are familiar with what the ColName attribute does.  This specifies the specific field in the underlying database you want that column to use.  As you can see in my case, ColName for both fields is set to nvarchar20.  This causes a big problem (and all of the errors you see above).  Now you ask why on earth would I have ColName specified?  Well, that is actually a result of SPSource.  I assume, the way it works is by looking at the Schema property of the field when it exports it which contains this extra information.  The fix is quite simple.  Just remove the ColName attribute and everything will work fine.  Again, if you haven’t checked out SPSource yet, I recommend it for exporting content types and lists, but be sure to look over any XML before you use it.

Filed under: , , ,

Comments

# re: Error: [COMException (0x80040e14): Exception from HRESULT: 0x80040E14]

Saturday, March 13, 2010 10:39 AM by Chetan

Nice article Corey! I think I'm having a similar scenario, just not sure which schema.xml to view & edit? When I searched there are a lot of schema.xmls files.

# re: Error: [COMException (0x80040e14): Exception from HRESULT: 0x80040E14]

Sunday, April 11, 2010 10:52 PM by Christian Garcia

Thanks. This save me a lot of time

# re: Error: [COMException (0x80040e14): Exception from HRESULT: 0x80040E14]

Monday, September 27, 2010 4:52 AM by Rocky

Thanks. Saved my day too.

# re: Error: [COMException (0x80040e14): Exception from HRESULT: 0x80040E14]

Friday, January 13, 2012 4:18 AM by Prett

Yes, I got this error message when I edited columns on a list & use method that is mention in your post as well as some other methods. But issue did not resolve then I have found this post:  

www.sharepoint-server-recovery.blogspot.com/2011_03_01_archive.html

Follow each & every steps mention in the post to get rid of error within few seconds.

# Tout le reste | Pearltrees

Wednesday, November 13, 2013 12:19 PM by Tout le reste | Pearltrees

Pingback from  Tout le reste | Pearltrees

Leave a Comment

(required)
(required)
(optional)
(required)