Note that there are some explanatory texts on larger screens.

plurals
  1. POMOSS 2007 site in a farm type initializer exception
    primarykey
    data
    text
    <p>We have some solution that we built against a MOSS farm one of which includes a timer job. This job has been working just fine for months. Recently the administrator enlisted another server into the farm, and our timer job automatically started running on this new machine. As soon as this switch happened our timer job started yielding the error below (found this in the SP logs).</p> <p>At first I thought it was a rights issue, but the timer service on the machine where it worked before and the new one are running under the same domain account. It seems to be failing while looping the site list in a site collection, on just one of the sites/webs (code snippet below). I know that this domain account has access to this because it works on the other box under same account. Does anyone have any ideas on why this cryptic error is occurring? Or if any special procedure needs to be done on this new machine to ensure it has proper ACL's for all databases in the MOSS farm?</p> <p><strong>Code:</strong></p> <pre><code>public static void Main(string[] args) { SPSecurity.RunWithElevatedPrivileges(delegate() { setInputParameters(); }); } private static void setInputParameters() { SPFarm farm = SPFarm.Local; SPWebService service = farm.Services.GetValue&lt;SPWebService&gt;(""); foreach (SPWebApplication webApp in service.WebApplications) { foreach (SPSite siteCollection in webApp.Sites) { using(siteCollection) { siteCollection.CatchAccessDeniedException = false; try { /* Here is the line that it fails on */ foreach (SPWeb web in siteCollection.AllWebs) </code></pre> <p><strong>Exception:</strong></p> <pre><code>The Execute method of job definition LMSDataImport (ID 4b37b285-ef8a-407c-8652-391639449790) threw an exception. More information is included below. The type initializer for 'Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1' threw an exception. Exception stack trace: at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.get_BackingList() at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.GetEnumerator() at Microsoft.SharePoint.Administration.SPAlternateUrlCollectionManager.LookupAlternateUrl(Uri canonicalRequestUri) at Microsoft.SharePoint.Administration.SPAlternateUrl.LookupCore(Uri uri, SPFarm farm) at Microsoft.SharePoint.Administration.SPWebApplication.Lookup(SPFarm farm, Uri requestUri, Boolean fallbackToHttpContext, SPAlternateUrl&amp; alternateUrl, SiteMapInfo&amp; hostHeaderSiteInfo, Boolean&amp; lookupRequiredContext) at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken) at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite) at Microsoft.SharePoint.Administration.SPSiteCollection.get_Item(String strSiteName) at Microsoft.SharePoint.Administration.SPSiteCollection.get_Item(Int32 index) at Microsoft.SharePoint.Administration.SPSiteCollection.ItemAtIndex(Int32 iIndex) at Microsoft.SharePoint.SPBaseCollection.SPEnumerator.System.Collections.IEnumerator.get_Current() at LMSDataImporter.setInputParameters() at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state) at Microsoft.SharePoint.SPSecurity.&lt;&gt;c__DisplayClass4.&lt;RunWithElevatedPrivileges&gt;b__2() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at Axian.AxianCalendar.LMSDataImporter.Main(String[] args) at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(TimerJobExecuteData&amp; data, Int32&amp; result) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload