We had this problem as well, starting when we moved to 4.5.1. Previously-installed modules had no problem, but when we added a new module the exceptions started showing up in the log -- one set for each instance of the module. It seemed to have something to do with whether the module implemented the ISearchable interface or not. Those with ISearchable behaved fine, but those that did not implement it (and hence did not include it as an inherited interface) resulted in the exceptions.
After looking into it further, the problem seems to be with the installation process. During installation, DNN determines the modules Supported Features (i.e., Portability, Searchability, and Upgradeability -- the checkboxes on the Edit Module Definition page) by using reflection. If the module inherits and implements the corresponding interface, then the installation routine stores that fact as a bit in a bitfield that it later stores as an integer in the DesktopModules table as the SupportedFeatures field. The bitfields correspond to Portable = 1, Searchable = 2, and Upgradeable = 4 so the possible combinations you might see in the SupportedFeatures field are 1, 2, 3, 4, 5, 6, or 7.
The problem seems to be that if the reflection fails when checking for the supported feature (as would be the case if the module doesn't implement ISearchable), it doesn't simply set the single bit to a 0. Instead it sets the entire bitfield to -1 (which is, of course, all 1's) and stores in the SupportedFeatures field in the DesktopModules table. (You can easily spot which modules have been installed like this by looking in the DesktopModules table for any that have -1 in the SupportedFeatures field.) When the SearchIndex job runs, it looks for the modules that have the Searchable bit set and then tries to access the functions on the ISearchable interface. When those are missing from a module, the SearchIndex job throws an exception.
So how do you stop the exceptions from being thrown? You have to find a way to change the value of the SupportedFeatures field for the module so that the bit representing 2 is a 0. There are several ways to accomplish this.
1. The easiest way is through editing the module definition from the Module Definitions page. Click the Edit button next to the module's entry in the list, to display the Edit Module Definition page. Click the Update link. This causes a re-setting of all the bitfields to 0's. After you then re-start the application you should no longer see the exceptions. The disadvantage of this method is that you also set the Portable and Upgradeable features to not be used as well. If you know the module you're trying to correct should have these capabilities, then use the next option below instead.
2. Directly modify the SupportedFeatures field in the DesktopModules table of your DNN database. Replace the -1 with one of the following based on the modules capabilities: Portable = 1, Upgradeable = 4, Portable AND Upgradeable = 5. Once you have done this and re-started the Application, the exceptions should stop.
3. Add a <businesscontrollerclass></businesscontrollerclass> section to the .DNN file for the PA. If you have control over the .DNN module in the PA, you can add a section similar to the following:
...
<version>01.00.00</version>
<businesscontrollerclass>ModNamespace.View, ModNamespace</businesscontrollerclass>
<modules>
...
When the installation routine sees this in the .DNN module, it properly reads the module's interfaces and sets the SupportedFeatures bitfields. You should NOT see the exceptions at all if you install your module with this line in the .DNN file. The disadvantage of this method is that there may be other -- unintended -- consequences of labeling your class as the Business Controller Class that are not anticipated.
NOTE: If the exceptions continue even after you re-start your application, you may still have to go to additional lengths, such as re-starting your Worldwide Web Service or rebooting your server, to terminate the threads that started using the original definition and are attempting to finish their work.
I hope this helps,
BillBR