September 10, 2019
CFObject in CF 2018 for calling a COM object
Comments
(8)
September 10, 2019
CFObject in CF 2018 for calling a COM object
Newbie 1 posts
Followers: 1 people
(8)

When calling the activePDF toolkit dll using this:

<CFOBJECT ACTION=”Create” TYPE=”COM” CLASS=APToolkit.Object NAME=”TK”> I get this error:

An exception occurred when instantiating a COM object.
The cause of this exception was that: AutomationException: 0x80040154 – Class not registered.

I did register the .dll  Also this is on Windows server 2016

This doesn’t happen in CF11 but does in CF 2018.  Any help would be greatly appreciated.

8 Comments
2020-10-19 18:28:01
2020-10-19 18:28:01

Did you ever find the solution to this? I am still having this issue with COM objects failing with CF2018,0,10,320417 on Windows 2019.  I have verified the COM object exists and can be called from VBS, but I get the same error as you when I call it from CF.

I get the same error as you “An exception occurred when instantiating a COM object.
The cause of this exception was that: AutomationException: 0x80040154 – Class not registered.” and this also worked fine for me on CF 2016.

 

 

Like
(1)
>
brookd
's comment
2020-10-19 21:38:36
2020-10-19 21:38:36
>
brookd
's comment

brookd, is your com object 32- or 64-bit? There were different discussions of that below, and note that while it’s indeed true that CF2018 no longer supports a 32-bit installer, it does still seem to have within it the things needed to support 32-bit com objects on 64-bit java (as CF 2018 is, inherently), as I will explain.

First. though, FWIW, I will point out another thread where someone had raised that they got this same error code, albeit on CF2016, and they found that reinstalling CF and “s.o. included” fixed things. You will see that I have asked there today if they could clarify what “s.o. included” is referring to.

But then someone reported the same 0x80040154 error code in an Adobe CF tracker bug report, https://tracker.adobe.com/#/view/CF-4198557 , and in that Piyush from Adobe proposed a technote from jintegra (the commercial tool underlying CF’s ability to call COM objects), which shared some other things that folks here may want to consider:  http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30926. Granted, the bug report is from CF2016 (and that article Piyush pointed to is far older than that, but still present).

Anyway, from that flow two more things. First, one thing Pisyush indicated there was the availability of a setDLLHost program, found in CF’s cfusion\jintegra\bin folder. There’s no doc there (in that folder or above it) to help with using it, but I found this: http://j-integra.intrinsyc.com/support/com/doc/tools/SetDllHost.html . But it seems that’s only needed for when the com object is on a remote server from CF (as is indicated also in the cf docs brief mention of the tool.)

But next, while looking at that jintegra folder in CF, I found a release notes doc (cfusion/jintegra/releasenotes.html), and in that it mentions yet ANOTHER tool in that bin folder, regprogid.exe, which may well be of use for some folks in this thread. It seems specific to the issue of using 32-bit com objects (on 64-bit java, as CF2018 is inherently). It notes:

“if the deployment requires the use of regprogid or regtlb, the 32-bit versions of these tools still need to be used. These tools have been bundled with the SDK, and can be found in the “bin32” directory.
Simply call these tools directly from the command line to use them.
E.G.
>C:\jintegra\com64\bin32\regprogid.exe Hello.World “MyJVM:MyClass”

And FWIW, there IS in fact a bin32 in CF, at cfusion\jintegra\bin32. So perhaps that may help with some people here. The docs for that are at http://j-integra.intrinsyc.com/support/com/doc/tools/regprogid.html.

Curious to hear if any of that may help any of you reporting this issue here, or if you learn some other solution.

Like
2019-11-27 21:33:33
2019-11-27 21:33:33

I have a similar situation when we migrated from CF11 to CF18. We have a client that does fax, it calls 32-bit COM objects. After migration to CF18, it stopped working because  CF18 doesn’t 32 bit anymore.

“Adobe ColdFusion (2018 release) cannot be run as a 32-bit application on the 32-bit versions of Microsoft Windows, Sun Solaris, Linux, and Mac OS. For details about supported platforms, see the ColdFusion system requirements.”

we pulled that com object call from ColdFusion and create a new website in IIS that makes this call and made sure this website is not configured to ColdFusion in wsconfig.

Thanks,

Harshith

Like
2019-09-12 21:38:34
2019-09-12 21:38:34

After getting support from activePDF, we found that CF, when trying to load a COM object is looking at a path that doesn’t exist: D:\ColdFusion2018\cfusion\wwwroot\WEB-INF\exception\coldfusion\runtime\com and also this key: HKCR\WOW6432Node\CLSID\{F74F7C81-E3B7-4974-95C6-E487390CCE48} which is not one of their CLSIDs.   How can I get help from Adobe on this?

Like
2019-09-10 23:15:58
2019-09-10 23:15:58

Is the “cf11 where this problem doesn’t happen” running on this same box? If not, then if you don’t find an explanation/solution for CF2018, you may want to install CF11 just to see if the problem DOES now happen in CF11 on this box. In that case, the problem is either in how you registered the DLL or some other aspect of configuration of the box, and not (it would seem) CF.

Like
(1)
>
Charlie Arehart
's comment
2019-09-11 04:03:59
2019-09-11 04:03:59
>
Charlie Arehart
's comment

I just downloaded and installed the newest edition of activePDF Toolkit on 2 servers which are identical, new, and running windows 2016.  One with CF18 and the other with CF11.  I didn’t bother registering any dlls – that should be the installer’s job.  I tried the same code on both and the CF18 server failed and gave the same error message as in my 1st post and the CF11 server worked perfectly.    In my first post I was referring to another very old server (win 2008 r2) that runs CF11 and never had an issue with Toolkit.  Now I’m at a loss.  I hate the thought of sticking with CF11 on a brand new server that I’m hoping lasts another 5 years.  Any suggestions?

Like
2019-09-10 23:01:12
2019-09-10 23:01:12

The program has a 32-bit and a 64-bit version and both are registered.  I’m not sure how the code knows which one to call.  CF should be 64 bit, just downloaded it on to a brand new server

Like
2019-09-10 22:40:24
2019-09-10 22:40:24

Is the DLL a 32-bit DLL? Are you using a 32-bit version of CF running in a 32-bit application pool? I think they both have to be the same “bit-ness”.

Dave Watts, Eidolon LLC

Like
Add Comment