"Object reference not set to an instance of an object"

Jul 20, 2009 at 12:32 PM

Good afternoon,

We have installed Faceted Search 3.0 on MOSS 2007 (Dutch version) Windows 2008 OS. The problem we face is getting a red exclamation mark on the facetedsearch.aspx we do get results, but miss the other webpart(s). We have no idea what we are doing wrong. Could you please help us out?

Eventvwr shows us the follwoing errors:

Timestamp: 20-7-2009 11:01:13
Message: HandlingInstanceID: ed40cd36-67fb-45b9-8ba5-6fc61d3d6c39
An exception of type 'Microsoft.Office.Server.Search.Query.ScopeNotFoundException' occurred and was caught.
-----------------------------------------------------------------------------------------------------------
07/20/2009 13:01:13
Type : Microsoft.Office.Server.Search.Query.ScopeNotFoundException, Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
Message : Het bereik in uw query bestaat niet.
Source : Microsoft.Office.Server.Search
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Microsoft.Office.Server.Search.Query.ResultTableCollection Execute()
Stack Trace :    at Microsoft.Office.Server.Search.Query.KeywordQuery.Execute()
   at Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.GenericQuery`1.Execute(EventArgs args)
   at Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchProcessor.ExecuteGenericQuery[T](Int32 resultsPerPage)
   at Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchProcessor.GetResults(Int32 resultsPerPage)

Additional Info:

MachineName : AM039
TimeStamp : 20-7-2009 11:01:13
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : /LM/W3SVC/66679378/ROOT-2-128925526303800021
ThreadIdentity : AM\Userid
WindowsIdentity : AM\Userid

Category: Information
Priority: 0
EventId: 100
Severity: Error
Title:Faceted Search Exception Handling
Machine: AM039
Application Domain: /LM/W3SVC/66679378/ROOT-2-128925526303800021
Process Id: 8232
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Win32 Thread Id: 5640
Thread Name:

and

Timestamp: 20-7-2009 11:01:13
Message: There is no explicit mapping for the categories 'Faceted Search Logging'. The log entry was:
Timestamp: 20-7-2009 11:01:13
Message: Exception processing query: <SearchQuery><Keywords>test</Keywords><Start>-1</Start><IsAdvancedSearch>False</IsAdvancedSearch><QueryMethod>KeywordQuery</QueryMethod><Properties /><FormData><IsAnd>False</IsAnd></FormData></SearchQuery>
Category: Faceted Search Logging
Priority: -1
EventId: 1
Severity: Information
Title:
Machine: AM039
App Domain: /LM/W3SVC/66679378/ROOT-2-128925526303800021
ProcessId: 8232
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Thread Name:
Win32 ThreadId:5640
Extended Properties:
Category:
Priority: -1
EventId: 6352
Severity: Error
Title:
Machine: AM039
Application Domain: /LM/W3SVC/66679378/ROOT-2-128925526303800021
Process Id: 8232
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Win32 Thread Id: 5640
Thread Name:
Extended Properties:

 

Jul 28, 2009 at 1:54 PM

I am getting the same error as mentioned above.

Looking forward to an answer.

Regards,

Amir

Jul 29, 2009 at 6:34 AM

Problem solved.

We were using the webparts on a Dutch SharePoint installation. Search scope is in the Dutch version "Alle Sites" instead of the English "All Sites", after adjusting this, all works fine.

Cheers

 

Aug 5, 2009 at 9:31 AM

I'm using a German installation of WSS 3.0 along with Search Server 2008 Express and I'm getting the same "Object reference not set to an instance of an object" error on the Search Facets web part.

You say "Search scope is in the Dutch version "Alle Sites" instead of the English "All Sites", after adjusting this, all works fine". What exactly did you do? Did you change the name of the scope from Dutch to English (I actually don't like this option)? Did you change some property of the Search Facets web part in order to look for the Dutch "Alle Sites" scope?

Thank you some much in advanced,

Carlos

 

Coordinator
Aug 5, 2009 at 4:28 PM

Please look up on your farm and post following information:

  1. Under SSP >> Search Administration >> Scope - what are the scopes names? "All Sites" specifically?
  2. When you start search from the home page using top nav bar search controls, what is the value in dropdown for "All Sites"? what is the Url you are redirected to after clicking search icon?
  3. In Search Facets web part properties, what is the value in the Scope field?
Aug 7, 2009 at 9:04 AM

Thank you Leonid for your prompt reply.

I solved it by following the third hint in your list --> Search Facets web part properties.

It was just a matter of changing the value in the "Scope" field, from "All sites" to its German counterpart "Alle Websites". After that, everything is working fine and dandy.

Carlos

Oct 28, 2009 at 7:43 PM
Edited Oct 28, 2009 at 7:47 PM

Hey I have a similar error but different issue.

MOSS 2007 SP1 Infrastructure Update (2 WFEs 1 Index(also CA) 1 Query SQL 2005 DB) - Load balanced behind F5 appliance. All servers Windows 2008 64bit

Followed install doc: Faceted_Search_Setup_Guide.docx from CA server. All works when accessing Search Center from an RDP session on the CA server.

Access from RDP to WFE results in this message on search results page:

Server Error in '/' Application.


Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 
[NullReferenceException: Object reference not set to an instance of an object.]
   Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchFacets.OnPreRender(EventArgs e) +944
   System.Web.UI.Control.PreRenderRecursiveInternal() +107
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3393

 


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3601

Accessing Web Part gallery to preview Facets Search web part from the WFE throws this error:

      Object reference not set to an instance of an object.   at Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchFacets.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 WFE Application Log has this same error twice (no other entries)

An error occurred in application /LM/W3SVC/1224388467/ROOT-3-129012310658482471 in the Enterprise Library Logging Application Block.
Unknwon failure.
The exception that occured was: System.ComponentModel.Win32Exception: The handle is invalid
   at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
   at System.Diagnostics.EventLog.WriteEvent(EventInstance instance, Byte[] data, Object[] values)
   at Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerWrapperBase.TraceData(TraceEventCache eventCache, String source, TraceEventType severity, Int32 id, Object data)
   at Microsoft.Practices.EnterpriseLibrary.Logging.LogSource.TraceData(TraceEventType eventType, Int32 id, LogEntry logEntry, TraceListenerFilter traceListenerFilter)
   at Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.ReportUnknownException(Exception exception, LogEntry log)

 

Coordinator
Oct 28, 2009 at 8:18 PM

Scott,

If Faceted Search works locally, then it is deployed correctly. Possibly there are issues with the farm configuration or F5 setup or something else. Hard to tell without troubleshooting, which requires proffessional support and is beyond this forum. For support please contact Stoic Tech.

Leonid

Oct 28, 2009 at 9:05 PM
Edited Oct 28, 2009 at 9:14 PM

Ok...but any thoughts on the error:

An error occurred in application /LM/W3SVC/1224388467/ROOT-3-129012310658482471 in the Enterprise Library Logging Application Block.
Unknwon failure.
The exception that occured was: System.ComponentModel.Win32Exception: The handle is invalid
   at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
   at System.Diagnostics.EventLog.WriteEvent(EventInstance instance, Byte[] data, Object[] values)
   at Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerWrapperBase.TraceData(TraceEventCache eventCache, String source, TraceEventType severity, Int32 id, Object data)
   at Microsoft.Practices.EnterpriseLibrary.Logging.LogSource.TraceData(TraceEventType eventType, Int32 id, LogEntry logEntry, TraceListenerFilter traceListenerFilter)
   at Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.ReportUnknownException(Exception exception, LogEntry log)

This is all that appears in the WFE application log when RDP'd accessing Search Center.

On the CA server there is no error and there are several Faceted Search Logging entries.

Maybe the Enterprise Library is crashing or mis-configured on the WFE?

 

Oct 28, 2009 at 9:20 PM

Found this in the ULS logs:

10/28/2009 16:13:08.31  w3wp.exe (0x135C)                        0x0C3C Office Server                  Office Server General          81vt High     

Faceted Search Receiver Exception: Cannot open log for source 'Enterprise Library Logging'. You may not have write access. :::    at System.Diagnostics.EventLog.OpenForWrite(String currentMachineName)     at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)     at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)     at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)     at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type)     at Microsoft.Practices.EnterpriseLibraryLogging.Instrumentation.LoggingInstrumentationListener.FailureLoggingError(Object sender, FailureLoggingErrorEventArgs e)     at Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.ReportUnknownException(Exception exception, LogEntry log)     at Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.Write(LogEntry log)     at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(Object message, ICollection`1 categories, Int32 priority, Int32 eventId, TraceEventType severity, String title, IDictionary`2 properties)     at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(Object message, String category)     at Microsoft.SharePoint.Portal.ExtendedSearch.Common.Utility.LogInformation(String msg)     at Microsoft.SharePoint.Portal.ExtendedSearch.Common.Utility.<>c__DisplayClass2.<SetScopes>b__0()     at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>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 Microsoft.SharePoint.Portal.ExtendedSearch.Common.Utility.SetScopes() 

Oct 28, 2009 at 9:32 PM

Update! Got it working by disabling the Logger.  Please help as I would like to be able to turn the logger back on.

Changed this:

<add source="Faceted Search Logging" formatter="Text Formatter" log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Formatted EventLog TraceListener" />

to this:

<add source="Faceted Search Logging" formatter="Text Formatter" log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="Off" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Formatted EventLog TraceListener" />

Coordinator
Oct 29, 2009 at 1:15 AM
scotttarnell wrote:

Found this in the ULS logs:

10/28/2009 16:13:08.31  w3wp.exe (0x135C)                        0x0C3C Office Server                  Office Server General          81vt High     

Faceted Search Receiver Exception: Cannot open log for source 'Enterprise Library Logging'. You may not have write access. :::    at System.Diagnostics.EventLog.OpenForWrite(String currentMachineName)     at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)     at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)     at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)     at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type)     at Microsoft.Practices.EnterpriseLibraryLogging.Instrumentation.LoggingInstrumentationListener.FailureLoggingError(Object sender, FailureLoggingErrorEventArgs e)     at Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.ReportUnknownException(Exception exception, LogEntry log)     at Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.Write(LogEntry log)     at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(Object message, ICollection`1 categories, Int32 priority, Int32 eventId, TraceEventType severity, String title, IDictionary`2 properties)     at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(Object message, String category)     at Microsoft.SharePoint.Portal.ExtendedSearch.Common.Utility.LogInformation(String msg)     at Microsoft.SharePoint.Portal.ExtendedSearch.Common.Utility.<>c__DisplayClass2.<SetScopes>b__0()     at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>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 Microsoft.SharePoint.Portal.ExtendedSearch.Common.Utility.SetScopes() 

 This looks like insufficient permission when 1st Ent Lib tries to create a new source "Enterprise Library Logging" for Event log. Try running setup under administrator.

Leonid

Mar 25, 2010 at 11:01 AM
I had same Problem. Changed scope to native language solved it. This schould be added to the install documentation. Thanks
Jun 26, 2010 at 5:38 PM

Sounds like everyone has modifiued the xslt to maybe remove the languages that are not needed provide drill downs or mapping facets on their specific content types. Its important that the XML is well formed and that the metadata property names you are using are correct.. I have had similar issues when I first started implementing this awesome free solution. How, I resolved the issue was to either use SPD or Visual Studio to make my changes to the to the mappings and when I copied and saved I imemediately reverted back to a previous version of the search result page and a previous version of the XML that Ib was working on. One other issue I noticed is that it was important to go to the /searchresults.aspx page directly and not to enter a search request to get to the page as this would almost always make my column mapping / selection end up with an error..

Thank you Leonid for an excellent addition to Search...

 

Cheers,

 

-Ivan