I've been using the dynamic class loading technique popularized by
Bill Buchan since June '06. (If you're unfamiliar with dynamic class loading, I gladly refer you to Bill's
BP312 Object Orientated LotusScript Techniques and Tricks presentation.) I've been extremely happy with the results with one exception. One database I've been developing off-and-on for the past year seems to have a problem with the classes I load dynamically in my agents. Whenever I change the classes, the agents that instantiate objects based on the classes return the following error:
$EXECUTE$+4: Class or type name not found: REQUESTFACTORY
Before I continue, I should state that LND 6.5.4 is being run on all Notes clients and Domino servers where I work. Yes, I deserve much pity and envy all of you who are using LND 7!!!
I tried re-saving the script libraries and then re-saving the agents that used the script libraries, and vice versa. The only way the error went away was when the server was rebooted. After the reboot, my agents were able to dynamically load the classes without a problem.
Since this project was put on hold since last September, I forgot all about this problem. Until today, that is.
Over the past several weeks, I've been testing the application and cleaning up the code when necessary. Lo and behold, the above error reared its ugly head again. I tried re-saving the script libraries and agents again, to no avail. Just as I was about to ask the Domino administrator to reboot the server, I decided to take another look at the script libraries containing the custom classes. And I had one of those epiphany moments that make you want to get up and leave work immediately, because the rest of the day just couldn't possibly get any better!
As I opened each of the eleven script libraries that contained custom classes, I noticed that three of them prompted me to save them when I closed them, even if I didn't touch the code at all. It turned out that for each of the these three script libraries, I'd added a comment to the script library's properties, like this:
On a hunch, I removed the comments from these script libraries and re-saved them. I retried my agents and the error was gone. Whoo-hoo! Talk about a Notes quirk!!!