Tuesday, March 17, 2009

An unhandled exception has occurred

We have been working on installing Business Portal for Great Plains on our SharePoint Server. One of the 1st things I noticed was that the programmers did not handle errors very well in their code. It has been very common to run into an "unhandled exception has occurred" error when trying to load a page.

Here is one error we started getting after our consultants installed an add-on to Business Portal (that is a different story):
Exception type: FileNotFoundException Exception message: Retrieving the COM class factory for component with CLSID {58737586-7149-11D4-9BB0-00A0CC359411} failed due to the following error: 8007007e.

Now this is from the Application Event Log, but the same message is displayed in the browser.

I was not able to find any useful information with Google and our consultants who installed Business Portal with our Great Plains installation had no idea. So after waiting a week, I started to dig a little deeper myself.

The error says that a file was not found, but does not give the name of the file. However, I was able to find the CLSID {58737586-7149-11D4-9BB0-00A0CC359411} in the registry under the HKEY_CLASSES_ROOT\CLSID folder. In that folder was an InprocServer32 folder with a default key. This key contained the path to the GPReg.dll file, but was pointing the D rive, which is the CD-ROM drive on the server. I did a quick search on the C drive, found the file and fixed the path in the registry. After restarting IIS, my error was gone.

Saturday, March 7, 2009

Debugging SharePoint

The default error messages in SharePoint are not useful, and that is being nice. Fortunately, there is a way to turn on error messages that provide more information. The following blogs postings give all the details:

Happy debugging.