Skip to main content
Known Participant
November 21, 2009
Question

cfobject - An exception occurred when instantiating a COM object

  • November 21, 2009
  • 2 replies
  • 7061 views

I'm getting the following error:

An exception occurred when instantiating a COM object.
The cause of this exception was that: java.lang.RuntimeException: Can not use native code: Initialisation failed.

1 :
2 : <cfscript>
3 :     oLoader = CreateObject("com", "easyPDF.Loader.6");
4 : </cfscript>

This is on a dedicated server with 64bit Windows Server 8 and 64bit ColdFusion 9.  easyPDF is a program that will convert files into PDF on the server, it is also the 64 bit version.

I'm not even trying to do anything but load the object and am getting the error.  I took a peek inside the registry and searched for "easyPDF.Loader" and it was found.

Any ideas what could be going wrong? Is there something I need to do with the CF setup or IIS to get this working?  It gives the same error with the following line of code as well.

<cftry>
    <cfobject type="com" action="connect" class="Word.application" name="this.wordCom" context="local">
    <cfcatch>
        <cfobject type="com" action="create" class="Word.application" name="this.wordCom" context="local">
    </cfcatch>
</cftry>

Any help or guidance would be great.  Is there a basic <cfobject type="com"> that should work on ANY computer without installing something that I could use to test?

Thanks!

This topic has been closed for replies.

2 replies

August 13, 2012

Same thing happen with Coldfusion version 9,0,2,282541 32-bit.

Participating Frequently
March 7, 2012

Have you found a fix for your issue? I'm having the same issue with getting easyPDF7 to work with CF9 ent 64bit. Some other forum comments seem to indicate that CF8 64bit and CF9 64bit do not support COM. But I havent seen anything on this from Adobe in the official documenation.

FYI, I've been running cf7 32bit with easyPDF5 for several years no problem.

Any help would be apreciated!

Inspiring
March 7, 2012

This seems to be the week for COM questions. 

The 64 bit versions do not support COM. There is probably something in the docs ... somewhere. The closest I have seen is this older article which states:

Most of the functionality and features of ColdFusion run just fine on 64-bit platforms, however, certain features like ColdFusion COM interoperability, ... do not work on a ColdFusion 64-bit platform.

Other than sticking with 32bit, you might try using a .net version instead.  A quick search of EasyPDF suggests they offer one.

     http://www.pdfonline.com/easypdf/sdk/programming-pdf/csharp/index.htm

BKBK
Community Expert
Community Expert
March 9, 2012

@ -==cfSearching==-

I can confirm. There were serious issues in all my COM tests on 64 bit .