I installed a feature to my production environment but now it is throwing the following error:
The Execute method of job definition
SharePointSocialNetworking.Facebook
(ID
528d61e4-95b6-4766-bb98-4363da570506)
threw an exception. More information
is included below. Object reference
not set to an instance of an object.Exception stack trace: at
SharePointSocialNetworking.Facebook.Execute(Guid
targetInstanceId) at
Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(TimerJobExecuteData&
data, Int32& result)
My problem is that my stack trace stops just as it’s getting useful… I need to know WHERE in the Execute method it is erroring out (maybe even a line number). They are just giving me enough info to have a general idea of what the problem is but not where it is happening…
Is there anywhere to get a FULL stack trace or to track down exactly where my “Object reference not set to an instance of an object.” error is occurring?
In my “Diagnostic Logging” section in the central admin I have “Least critical even to report to the event log” set to “Error” and “Least critical event to report to the trace log” set to “Verbose”.
This is for a timer-job.
Because your pdbs dont get packaged and deployed, you cant get line numbers from your exceptions
How can I include line numbers in a stack trace without a pdb?
But i get around it by building a ‘message’ as a process happens, you know where the error occurs because of the value in the ‘message’.
All my sharepoint jobs are structured similar to this:
This allows me to trace most errors fairly accurately in development and production
EDIT
There are ways to write to the trace logs in 2007 (more complicated sure)
http://weblogs.asp.net/erobillard/archive/2008/07/31/sharepoint-trace-logs-and-the-unified-logging-service-uls.aspx
http://msdn.microsoft.com/en-us/library/aa979522%28v=office.12%29.aspx
http://weblogs.asp.net/gunnarpeipman/archive/2009/02/25/sharepoint-writing-messages-to-uls-unified-logging-system.aspx
But i just wrote straight to the event log: