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?