Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chad Rosenthal 272 posts 474 karma points
    Feb 14, 2011 @ 19:02
    Chad Rosenthal
    0

    Error rebuilding Examine Indexes programmatically

     

    I have a random error trying to rebuild an examine Index. The code referenced below cycles through 4 indexes. If you click a button it will rebuild that index. It works for 3 of the 4 indexes, but fails on the forth. To make it more complicated, it only happens on our staging server and not my local computer.

    Site: Umbraco 4.6.1 using ASP.NET 4

    Staging Server: Windows Server 2003: IIS 6

    Locally: Windows 7: IIS 7.5

    Locally, I can rebuild all 4 of the indexes referenced by thte clickedButton. On staging....only 3 of the 4. They both use the same SQL Server 2005 database.

    On staging, I performed the following once I received the error:

    - deleted the 4 folders in APP_Date.

    - Deleted umbraco.config. 

    - Recycled App_pool

    - Logged back in

    - Rebuilt the site.

    - Reran the indexes. and still only 3 of the 4 worked.

    Any ideas would be greatly appreciated.

    -C

    The error is:

    Value cannot be null.
    Parameter name: String
    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.ArgumentNullException: Value cannot be null.
    Parameter name: String
    Source Error: 

    Line 28:             Button clickedButton = (Button)sender;
    Line 29:             string indexToRebuild = clickedButton.CommandArgument;
    Line 30:             ExamineManager.Instance.IndexProviderCollection[indexToRebuild].RebuildIndex();
    Line 31:             result.Text = string.Format("Index {0} added to index queue", indexToRebuild);
    Line 32:             result.Visible = true;
    Source File: d:\INETPUB\sites\devsites\JewishCommunityFed\JCF1003\stagingUmbraco\usercontrols\Umbraco\ExamineIndexAdmin.ascx.cs    Line: 30 
    Stack Trace: 

    [ArgumentNullException: Value cannot be null.
    Parameter name: String]
       System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594206
       System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
       Examine.LuceneEngine.ExamineXmlExtensions.IsExamineElement(XElement x) +132
       Examine.LuceneEngine.ExamineXmlExtensions.ExamineNodeTypeAlias(XElement x) +13
       Examine.LuceneEngine.Providers.LuceneIndexer.ValidateDocument(XElement node) +53
       UmbracoExamine.BaseUmbracoIndexer.ValidateDocument(XElement node) +265
       Examine.LuceneEngine.Providers.LuceneIndexer.AddNodesToIndex(IEnumerable`1 nodes, String type) +120
       UmbracoExamine.BaseUmbracoIndexer.AddNodesToIndex(String xPath, String type) +93
       UmbracoExamine.BaseUmbracoIndexer.PerformIndexAll(String type) +769
       Examine.LuceneEngine.Providers.LuceneIndexer.IndexAll(String type) +72
       UmbracoExamine.BaseUmbracoIndexer.PerformIndexRebuild() +86
       Examine.LuceneEngine.Providers.LuceneIndexer.RebuildIndex() +348
       usercontrols.Umbraco.ExamineIndexAdmin.RebuildClick(Object sender, EventArgs e) in d:\INETPUB\sites\devsites\JewishCommunityFed\JCF1003\stagingUmbraco\usercontrols\Umbraco\ExamineIndexAdmin.ascx.cs:30
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

  • kows 81 posts 151 karma points c-trib
    Feb 15, 2011 @ 11:06
    kows
    0

    Must be that either your button is null or the commandargument is null.

    Did you try attaching your local deployment to the solution and ran through it step by step to see what values get filled in?

  • Chad Rosenthal 272 posts 474 karma points
    Feb 15, 2011 @ 14:30
    Chad Rosenthal
    0

    It actually ended up being that I deleted an item programmatically, and it just wiped out all of the items in the index. I ended up going with a solution that wasn't using the index in the same way and now it's working 100%.

    Thanks,

    C

     

Please Sign in or register to post replies

Write your reply to:

Draft