Welcome!

The Latest Time Saving Tips for Your SharePoint Deployment

Corey Roth

Subscribe to Corey Roth: eMailAlertsEmail Alerts
Get Corey Roth via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Intel XML, XML Magazine, SEO Journal, SharePoint Archiving Journal, Microsoft Developer, CIO/CTO Update, VITO Report

Blog Feed Post

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

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.

Read the original blog entry...

More Stories By Corey Roth

Corey Roth, a SharePoint Server MVP, is an independent consultant specializing in Cloud technologies such as Azure and Office 365. He also specializes in mobile development. Corey serves as the product manager for two cloud-first mobile app platforms: BrewZap and HappenZap.