ColdFusion MX: Class Not Registered error when using COM objects
Issue
During the installation of Macromedia ColdFusion MX, the filecf_root/lib/typeviewer.dll is registered on Windows platforms. If it is unable to successfully register the file, you will receive the following error when calling COM objects throughcfobject or createObject:
----- An exception occurred when instantiating a Com object. The cause of this exception was that: AutomationException: 0x80040154 - class not registered. -----
COM objects must be registered within Windows in order for ColdFusion to find them. If they are not, you will receive the error above. If the COM object has been registered, either manually or through a setup program, but you still receive this error, it may be caused by cf_root/lib/typeviewer.dll not being registered successfully.
Solution
You can use two methods to determine ifcf_root/lib/typeviewer.dll was registered successfully during the installation of ColdFusion:
Windows RegEdit- From the Start menu, run RegEdit.
- In the left pane, highlight My Computer.
- From the menu, select Edit > Find.
- Enter typeviewer.dll in the search field.
If the .dll is not registered, the search will find 0 results.
- Using the Microsoft OLE/COM Object Viewer, expand the Type Libraries folder.
- Look for an entry labeled TypeViewer 1.0 Type Library (Ver 1.0)
- In the right pane, verify the win32 value is set tocf_root/lib/typeviewer.dll.
If the .dll is not registered, follow the steps below:
- Select Start > Run.
- Type regsvr32 cf_root\lib\typeviewer.dll
where cf_root is the ColdFusion installation directory. By default this directory is C:\CFusionMX.
Additional Information
- Issues with using COM objects in ColdFusion MX (TechNote 18246)
- Accessing complex COM objects in ColdFusion MX using Java Stubs (TechNote 18211)
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
