• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfobject - An exception occurred when instantiating a COM object

New Here ,
Nov 21, 2009 Nov 21, 2009

Copy link to clipboard

Copied

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!

TOPICS
Advanced techniques

Views

6.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2012 Mar 06, 2012

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 07, 2012 Mar 07, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2012 Mar 09, 2012

Copy link to clipboard

Copied

@ -==cfSearching==-

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 09, 2012 Mar 09, 2012

Copy link to clipboard

Copied

To get around this issue, I've tried accessing the COM object directly in java, dynamically compiling using javaloader 1.1. But my java class fails when I try to import any COM package. I get the error “package com.bcl.easypdf does not exist”. This leads me to beleive that the com issue originates with the version of java CF is running on.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 09, 2012 Mar 09, 2012

Copy link to clipboard

Copied

I do not use easyPDF, so I am making some assumptions here ... but it sounds like what you are using is not a pure java library. If it is still dependent on COM then it will not work under any application using a 64bit jvm.

This leads me to beleive that the com issue originates with the version of java CF is running on.

Correct. 64bit jvm's cannot load native 32 bit dlls.

Will 32-bit native code work with a 64-bit VM?

http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#64bit_native_porting

J-Integra (Third party library used by CF for COM interop)

http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30963

Message was edited by: -==cfSearching==-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 09, 2012 Mar 09, 2012

Copy link to clipboard

Copied

@BKBK - Yeah, apparently it is due to jvm limitations. I do not use COM much. The few CF references I have seen refer to CF8. So while the lack of support is not new, given the general shift towards 64bit operating systems I am surprised the limitation was not mentioned more prominently in the CF9 docs, especially in the createObject section.

-Leigh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2012 Mar 15, 2012

Copy link to clipboard

Copied

Just to give everyone some closure in this matter:

I've opened a case with Adobe Support. Their reply was:

COM interoperability with CF9 is not supported on 64 bit Windows OS. This is due to the limitations imposed by JIntergra. You can find a reference for this in the following tech-note:http://helpx.adobe.com/coldfusion/kb/coldfusion-limitations-running-coldfusion-64.html

It seems that J-Integra (http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30963) won't update their code libraries for 64-bit support due to lack of customer demand for this functionality. Mind you this is the newest technot I could find on the matter but it was last update in 2010. I've also emailed j-Integra sales (http://j-integra.intrinsyc.com/contact.asp) to inquire about any progress in porting over their libraries to 64-bit. Who knows, if they get enough requests...

I will now try to access my COM libraries from a .NET dll and call it using cfexecute.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 15, 2012 Mar 15, 2012

Copy link to clipboard

Copied

It seems that J-Integra (http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30963)

Yep, that is the same link I posted above. But my impression was it is due to technical jvm limitations, not lack of interest.

I will now try to access my COM libraries from a .NET dll and call it using cfexecute.

So you tried calling their .net assembly from CF already (via createObject) and that did not work?

Message was edited by: -==cfSearching==-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2012 Aug 01, 2012

Copy link to clipboard

Copied

Is this still true for CF10?

Are there ANY workarounds?

I find it hard to believe that now that the 64 bit platform comes at the expense of COM.

Can I create a 64 bit .NET step down converter?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2012 Aug 01, 2012

Copy link to clipboard

Copied

cf10 still relies on j-integra for COM, which is still only 32bit. Because of tight timelines, I reverted to cf9 32-bit. Note that I didn't install the 9.0.1 updater as I found posts about COM issues with this version.

I didn't try the .NET route because I ran out of time.

If you have time to play, I found a couple post about people getting cf to access com using the Jacob bridge: http://sourceforge.net/projects/jacob-project/. I beleive Railo also provides COM support using jacob. Another option would be to try railo.

Good luck.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 13, 2012 Aug 13, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation