Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Running a SharePoint 2010 farm. Whenever I attempt to create a new site collection I get the following error "Object reference not set to instance of an object" which is generated from a generic NullReferenceException. This occurs regardless of what interface I use to create it (central administration, powershell, stsadm).

Here is the stack trace from the logs:

System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(IEnumerable`1 contentDatabases, Guid siteIdToAvoid, Guid webIdToAvoid, SPContentDatabase database, SPContentDatabase databaseTheSiteWillBeDeletedFrom) at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(SPSiteCreationParameters siteCreationParameters, Guid siteIdToAvoid, Guid webIdToAvoid, SPContentDatabase database, SPContentDatabase databaseTheSiteWillBeDeletedFrom) at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(SPSiteCreationParameters siteCreationParameters)

I assume this is caused by a broken content database that is referred to but does not actually exist. Has anyone encountered this problem before? Is there a way to detect and remove orphaned or broken database references without combing through the configuration database?

share|improve this question

3 Answers 3

There is a null reference associated with the web application; the steps for removal are here:

http://mydailytechlog.blogspot.com/2011/12/sp2010-cannot-create-new-site.html

share|improve this answer

I don't know what can be the cause, but first I would check if both, the application pool user and the timer job user, have the proper permissions on all of the content databases.

Also HERE is similar issue. Exception there occurs while restoring a site collection, but maybe it will give You some hint...

share|improve this answer

Have a look at this article it covers various reasons and resolutions why this issue may occur http://sp-vinod.blogspot.com/2012/02/cannot-create-site-collection-error.html

share|improve this answer
1  
Welcome to SharePoint! While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See How to Answer for general guidelines. –  Kit Menke Feb 6 '12 at 16:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.