Go to previous topic
Go to next topic
Last Post 02 Apr 2013 04:49 PM by  Steve L
SearchBoost and Revindex Task Scheduler possible incompatible
 8 Replies
Author Messages


New Member


Posts:
New Member


--
21 Mar 2013 02:09 PM

    Hi Stephen, Have you ever seen the following error before? I am not sure if this is a conflict between your Task Scheduler and SearchBoost. Is this something you can address or should I report to Bogdan at DnnSharp? Thanks, Nathan

    DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProviderInnerException: Error Creating BusinessControllerClass 'Revindex.Dnn.RevindexTaskScheduler.RevindexTaskSchedulerController, Revindex.Dnn.RevindexTaskScheduler' of module(Revindex.Dnn.RevindexTaskScheduler) id=(1914) in tab(564) and portal(2)Method: avt.SearchBoost.Core.Indexing.SbIndexer_Modules.IndexModules

    StackTrace:

    Message: System.Exception: Error Creating BusinessControllerClass 'Revindex.Dnn.RevindexTaskScheduler.RevindexTaskSchedulerController, Revindex.Dnn.RevindexTaskScheduler' of module(Revindex.Dnn.RevindexTaskScheduler) id=(1914) in tab(564) and portal(2) ---> System.Exception: Exception of type 'System.Exception' was thrown. at avt.SearchBoost.Core.Indexing.SbIndexer_Modules.IndexModules(Int32 PortalID, Logger logger, LuceneStorage dataStore, IEngineSettings config, IndexingStatistics stats) --- End of inner exception stack trace ---

    0


    Veteran Member


    Posts:2952
    Veteran Member


    --
    21 Mar 2013 02:30 PM

    That seems to be a SearchBoost issue because I think it's trying to instantiate the search interface method but the Task Scheduler does not implement ISearchable. I think Bogdan would understand what it means and knows what to do.

    0


    New Member


    Posts:
    New Member


    --
    21 Mar 2013 03:56 PM

    I have gone to Bogdan with what you have said and he has come back with the following.

    The error indicates that the constructor of the RevIndexTaskScheduler module either doesn't exist (invalid name, wrong spelling, etc) or is throwing an exception.
    All Search Boost is creating a new RevindexTaskSchedulerController().

    0


    Veteran Member


    Posts:2952
    Veteran Member


    --
    21 Mar 2013 04:35 PM

    The public constructor exists (he can easily validate this by downloading the trial and inspecting the DLL). I think he needs to research deeper why he's getting the error.

    In either case, our module works correctly with DNN and it has no knowledge of SearchBoost, neither does it need to. SearchBoost, as I understand, tries to augment the DNN search by running it's own indexing by peeking into other modules and trying to make it return search keywords to index. Instead, it's up to SearchBoost to handle every module situation it encounters.

    p.s. the Task Scheduler has no interesting properties or keywords to index, so it probably won't matter to your overall search results.

    Thanks,

    0


    New Member


    Posts:
    New Member


    --
    21 Mar 2013 04:40 PM

    Thanks Stephen, I would prefer it if I could tell SB not to index any modules as I do everything using direct database indexing from within SB so it has no benefit in trying look into modules. Thanks again for your help, I will go back to Bogdan.

    Nathan

    0


    New Member


    Posts:
    New Member


    --
    02 Apr 2013 09:53 AM

    Hi Stephen

    Bogdan added some debug code so that we could see where the error was occuring and he is convinced that it is happening within the RevindexTaskSchedulerController constructor.

    Below is a copy of the code that he is executing and the error occurs, maybe you can see what is wrong because he says he is at a loss. One thing I have noted which Bogdan agrees with is that if your TS was not flagged as iSearchable then SB would not try to access the module and I guess the issue would then go away. I dont see any reason why SB needs to be iSearchable so could you make this change so we can test it out unless of course you can see something wrong in the SB code below. Thanks.

    foreach (ModuleInfo objModule in arrModules) {

    if (string.IsNullOrEmpty(objModule.DesktopModule.BusinessControllerClass))

    continue;

    if (!businessControllers.ContainsKey(objModule.DesktopModule.BusinessControllerClass)) {

    try {

    object objController = DotNetNuke.Framework.Reflection.CreateObject(objModule.DesktopModule.BusinessControllerClass, objModule.DesktopModule.BusinessControllerClass);

    if (!(objController is ISearchable))

    throw new Exception(string.Format("BusinessControllerClass {0} does not implement ISearchable", objModule.DesktopModule.BusinessControllerClass));

    businessControllers[objModule.DesktopModule.BusinessControllerClass] = objController;

    } catch (Exception ex) {

    string strMessage = string.Format("Error Creating BusinessControllerClass '{0}' of module({1}) id=({2}) in tab({3}) and portal({4}) ", objModule.DesktopModule.BusinessControllerClass, objModule.DesktopModule.ModuleName, objModule.ModuleID, objModule.TabID, objModule.PortalID);

    Exceptions.LogException(new Exception(strMessage, ex));

    logger.Error(new Exception(strMessage, ex));

    continue; // go to next module

    }

    }

    }

    0


    Veteran Member


    Posts:2952
    Veteran Member


    --
    02 Apr 2013 03:58 PM

    Hi Nathan,

    The Task Scheduler doesn't implement ISearchable. The ISearchable is a piece of code that tells the DNN core system that this module can be searched on and will be clearly marked in the class declaration with the keyword "ISearchable". The class signature for the Task Scheduler is shown below and clearly it doesn't implement ISearchable:

    public class RevindexTaskSchedulerController : IUpgradeable

    I don't know where the error is coming from his module. I'm looking through a small keyhole of the entire code so it's hard to tell and I can't spend too much time on this either since it's clearly a SearchBoost issue.

    Perhaps, you can suggest to them:

    a) the code can be made to test for ISearchable first before instantiating the object or

    b) it should check if the type can be instantiated first instead of letting it throw an error or

    c) more elegantly deal with error that can occur during instantiating an unknown type or

    d) follow the DNN source code and figure out how the core DNN core search is able to ignore Task Scheduler without throwing an error as it must know that it's not searchable.

    Thanks,


    0


    New Member


    Posts:
    New Member


    --
    02 Apr 2013 04:23 PM

    Ok well their is clearly an issue then because if you go to the Host/Extensions page and look at the definition for your TS you will see that it says iSearchable: True and iPluggable: True. I have checked your other modules e.g. Optimizer and Impersonator and these are both False whereas the Store is True which is as I would expect.I have attached a link to a screenshot.

    http://www.dianamossop.com/aaa/ts1.jpg

    Nathan

    0


    Veteran Member


    Posts:2952
    Veteran Member


    --
    02 Apr 2013 04:49 PM

    It probably picked up the searchable from the manifest. It won't really matter because we're talking about ISearchable in the controller class and not about general searchability flag in the manifest.

    In particular, we're referring to SearchBoost's line of code that checks for ISearchable in the DLL itself. The searchable flag in the manifest has no effect on it. DNN 6 core search also performs a DLL test for ISearchable and doesn't look at the manifest flag either.

    if (!(objController is ISearchable))

    Thanks,

    0


    ---