11 Replies Latest reply: Aug 13, 2012 11:42 AM by cfmx-boy RSS

    cfobject - An exception occurred when instantiating a COM object

    dbldutch Community Member

      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!