SharePoint 2010 + Kofax Express + Object reference not set to an instance of an object
I’ve been working with Kofax Express 2.0 recently to move documents from a scanner directly in to a SharePoint document library. I was using a custom list definition (created in Visual Studio) but was experiencing a strange error. If I created an instance of my list through the UI and then tried to scan from Kofax directly in to SharePoint, it was working no problem. However, if I tried to scan directly to SharePoint to the instance of the list created by the Visual Studio solution, I was getting the common error - “Object reference not set to an instance of an object”. There were no helpful logs on the Kofax or SharePoint end, and it was only through trial and error that I found the issue. I noticed that when the list was created through the UI, it was created with a URL of “/Document Library Name” whereas in my list instance definition in Visual Studio, I had given it a URL of “/Lists/Document Library Name”. It was the Lists part at the beginning which was causing an error. I don’t know why this caused Kofax to fail to find the library, but nevertheless, setting the URL in the list instance as just “/Document Library Name”, resolved the issue.