Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3691332
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:08:10+00:00 2026-05-19T04:08:10+00:00

I installed a feature to my production environment but now it is throwing the

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:08:10+00:00Added an answer on May 19, 2026 at 4:08 am

    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:

    public class CustomJob : SPJobDefinition {
        public override void Execute() {
            try {
                WriteTrace("CustomJob.Execute:");
                Process();
                WriteTrace("CustomJob.Execute[end]");
            } catch (Exception ex) {
                WriteTrace(string.Format("CustomJob.Execute\nException: {0}", ex));
            }
        }
        public void Process() {
            string message = "CustomJob.Process\n";
            try {
                //do something
                message += "value1: " + value1 + "\n";
                //do something
                message += "value2: " + value2 + "\n";
                //do something
                message += "value3: " + value3 + "\n";
            } catch (Exception ex) {
                WriteTrace(string.Format("CustomJob.Process\nException: {0}", ex));
            }
            WriteTrace(message);
        }
        private void WriteTrace(string message) {
            //configure how you need, either write to ULS or write to event log
            SPDiagnosticsService.Local.WriteTrace(0, 
                new SPDiagnosticsCategory("My Category", 
                TraceSeverity.Unexpected, 
                EventSeverity.Error), 
                TraceSeverity.Unexpected, message, ex.StackTrace);
        }
    }
    

    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:

            EventLog el1 = new EventLog();
            el1.Source = "My Custom Source";
            el1.WriteEntry(message, EventLogEntryType.Information);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dev environment with VS2010 and SP2010 installed in and a production
I have installed Async-CTP-v3 for using new feature of C# 5 but when I
In production environment, we have a SharePoint site with some Nintex 2007 workflows. Now
I have installed API for using new feature of C# 5 but some strange
I have installed Eclipse Indigo and the auto-complete feature is working normally in the
I've successfully installed Membase Server, their Sub-millisecond access latency feature is actually forced me
Installed both SonataMediaBundle, SonataNewsBundle and SonataAdminBundle (and much more but these matter). When posting
Installed rubyinstaller-1.8.7-p358.exe, then tried to install jammit , but the config.gem command isn't being
I installed CLisp today on my Win7 PC. Please don't criticize my environment choices,
How can I remove an installed feature from an IIS instance? E.g., Url Rewrite?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.