Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsReportsController.vb:line 83 NullReferenceExceptionReportsController.vb:line 83 NullReferenceException
Previous
 
Next
New Post
10/5/2006 4:20 PM
 
Anybody else getting this in the logs using Reports 4.3.1 and any ideas about it?

Message: System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Services.Localization.Localization.GetString(String name) at DotNetNuke.Modules.Reports.ReportsController.GetReport(Int32 ModuleId) in c:\hosting\webhost4life\member\xxxxxx\App_Code\ReportsController.vb:line 83 at DotNetNuke.Modules.Reports.ReportsController.GetSearchItems(ModuleInfo ModInfo) in c:\hosting\webhost4life\member\xxxxxxx\App_Code\ReportsController.vb:line 226 at DotNetNuke.Services.Search.ModuleIndexer.GetSearchIndexItems(Int32 PortalID)


ver 4.3.1 (to 8 July 2006) ver 4.3.2 (to 20 July 2006) ver 4.3.3 (to 5 Aug 2006) ver 4.3.4 (to 20 Sep 2006) ver 4.3.5 (to 25 Dec 2006) ver 4.4.0 (to date)
 
New Post
10/5/2006 9:38 PM
 
I've seen it before, and I'm not sure why its happening. Fortunately, it doesn't seem to have a serious effect, other than the performance overhead from the Exception and the possible lack of Search Indexing. I'll keep investigating, but it doesn't appear to have adverse effects. But if anyone has any ideas, I'm certainly interested!

Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post
10/5/2006 10:38 PM
 
Thanks Andrew!

ver 4.3.1 (to 8 July 2006) ver 4.3.2 (to 20 July 2006) ver 4.3.3 (to 5 Aug 2006) ver 4.3.4 (to 20 Sep 2006) ver 4.3.5 (to 25 Dec 2006) ver 4.4.0 (to date)
 
New Post
12/16/2006 5:40 PM
 

Guys,

 

Wouldn't this because the search engine is multithreaded and it is spawned in a different thread so the call to GetString is trying to access the HttpContext but there isn't one.  The thread is NOT kicked off from an HTTP request.  You need to find a different way to get at the PortalSettings object besides going to HttpContext.  All Module developers need to be aware of this if they implement the search interface.  Or am I wrong here?

Public

 

 

 

Shared Function GetString(ByVal name As String) As StringDim objPortalSettings As PortalSettings = CType(HttpContext.Current.Items("PortalSettings"), PortalSettings)Return GetString(name, Nothing, objPortalSettings, Nothing)End Function

Version: DNN 4.4.1
Hosting Provider: 1and1
RAISE
 
New Post
12/16/2006 6:18 PM
 
BTW, I just fixed this...In the localization getstring method above I check to see if HttpContext.Current is null I just return an empty string. Recompiled dotnetnuke.dll and deployed and the search engine scheduled task ran, and no errors in the event log. 

Version: DNN 4.4.1
Hosting Provider: 1and1
RAISE
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsReportsController.vb:line 83 NullReferenceExceptionReportsController.vb:line 83 NullReferenceException


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out