Posted by admin on 21st July 2008

ListInstance and "Object reference not set to an instance of an object"

Description
While activating a feature that contains list instances I get an “Unknown error” message in the SharePoint UI.

Log Entry
The element ‘NameOfListInstance’ of type ‘ListInstance’ for feature ‘MyCompany.SharePoint’ (id: 00000000-0000-0000-0000-000000000000) threw an exception during activation: Object reference not set to an instance of an object.

My solution
After a lot of debugging I noticed that if I remove the RootWebOnly=”TRUE” attribute from the ListInstance element the error goes away.

    3 Responses

  1. KMan says:

    Geez thanks. SharePoint sucks!

  2. KMan says:

    Really thanks though! The error message wasn’t at all helpful

  3. Nick says:

    Thank you SO much :)

Post your comments