Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  Reports module crash when rebuilding the search index
Previous Previous
 
Next Next
New Post 8/19/2008 7:31 AM
Resolved
User is offline Lars Tungen
13 posts
10th Ranked


Reports module crash when rebuilding the search index 

For some weeks null-reference exceptions have been logged in events by the scheduler. It was the search indexer that was causing the exception. I decided to clean the search-index tables and rebuild the index from scratch. When I try to rebuild the index I get the following exception:

Error: Search Admin is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Value cannot be null. Parameter name: format ---> System.ArgumentNullException: Value cannot be null. Parameter name: format at System.String.format(IformatProvider provider, String format, Object[] args) at System.String.format(String format, Object[] args) at DotNetNuke.Modules.Reports.Exceptions.ReportsModuleException.get_Message() at System.Exception.ToString() at DotNetNuke.Services.Log.EventLog.ExceptionLogController.AddLog(Exception objException, ExceptionLogType LogType) at DotNetNuke.Services.Exceptions.Exceptions.LogException(Exception exc) at DotNetNuke.Services.Search.ModuleIndexer.GetSearchIndexItems(Int32 PortalID) at DotNetNuke.Services.Search.SearchEngine.GetContent(IndexingProvider Indexer) at DotNetNuke.Services.Search.SearchEngine.IndexContent() at DotNetNuke.Modules.Admin.Search.SearchAdmin.cmdReIndex_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

 
New Post 8/21/2008 3:28 AM
User is offline Lars Tungen
13 posts
10th Ranked


Re: Reports module crash when rebuilding the search index 

I have done some more research on a clean source install of DotNetNuke 4.8.4 and the reports module version 5.0.0. Everything is fine until I add a reports module instance to the site where the SQL query uses a parameter (@TabId). If the report has no parameters the search indexer works as expected. Once I use a parameter the search indexer crash and the search function becomes unusable for the entire host. As long as the report is there, the searchindex for the host will not be updated.

I think this is a serious bug. How can a bug/flaw in the reportsmodule be allowed to block the search indexer from completing. Exceptions should be logged and the search indexer be allowed to continue to the next module or tab instance.

Why does the use of the built-in parameters in the reports module throw an exception when the site is being indexed by the search indexer?

 

 
New Post 8/22/2008 3:55 AM
User is offline Lars Tungen
13 posts
10th Ranked


Re: Reports module crash when rebuilding the search index 

Thanks to Fuji Nguyen excellent write up on how to compile and debug the Reports module source.

I have managed to track down the problem. Actually, it's two problems. One problem regarding the use of parameters in the reports module and another problem with exception logging.

When the search indexer calls the ReportsController.GetSearchItems()  the parameter collection that is passed down to the DotNetNukeDataSource instance will be empty. If the query requires one or more parameters (@TabId in my case) the SQL will fail because of the missing parameter. An exception will be thrown from line 50 in DotNetNukeDataSource.vb.

When the exception is being logged the Message property in ReportsModuleException.vb will fail yet again and obscure the original exception message:

        Public Overrides ReadOnly Property Message() As String
            Get
                Dim localized As String = String.Empty
                If Not String.IsNullOrEmpty(_resourceFile) Then
                    localized = Localization.GetString(_resourceKey, _resourceFile)
                Else
                    localized = Localization.GetString(_resourceKey)
                End If
                If _formatArgs IsNot Nothing AndAlso _formatArgs.Length > 0 Then
                             Return String.format(localized, _formatArgs) <-- localized Is Nothing!!
Else Return localized End If End Get End Property
Instance field values:
_resourceKey = "SqlError.Text"
_resourceFile = "/DataSources/DotNetNuke/App_LocalResources/DataSource.ascx.resx"
_formatArgs = {Length=2}
               {0} = "1"
               (1) = "Must declare the scalar variable "@TabId"."

 

The error reporting can't resolve the value for "SqlError.Text". Could it be the resource file name that is incorrect?

Can the missing parameters be added for the GetSearchItems() method also? I know @UserId must be set to Null, but the other parameters like @TabId, @PortalId and @ModuleId are known when the indexer is running.

 

 
New Post 8/25/2008 1:34 PM
User is offline Lars Tungen
13 posts
10th Ranked


Re: Reports module crash when rebuilding the search index 

I have created a new DataSource extension for the reports module that will fix this bug. This extension also supports the use of parameter values from the http request query string. I followed the Developing an RSS Data Source blog posting by Andrew Nurse and my data source works in my development environment. But now I have a problem with creating an install package for the data source. I don't know how to put a file into the App_Code\[MyModuleName] folder on the website.

I have tried using [app_code] as the value for path but I get an error message from the installer. Any ideas on how to fix this?

Thanks

 
New Post 8/26/2008 4:46 AM
User is offline Lars Tungen
13 posts
10th Ranked


Re: Reports module crash when rebuilding the search index 

Found the solution to my installation problem. Looks like it's not possible to get the source code file to install properly into the App_Code folder. But if I create a compiled assembly using the steps provided by the Packaging your DotNetNuke module tutorial the resulting assembly for my source code file can be added to the installation package. The data source extension will now install correctly. I will put it up for download within the next few days.

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  Reports module crash when rebuilding the search index
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au
Venexus, Inc.
Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget.
www.venexus.com
Bring2mind
Document Centric DNN Module Solutions
www.bring2mind.net

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP