I currently have a production server that runs:
Windows Server 2008 R2 64 Bit
Cold Fusion 9.0.1 32 Bit (JVM version 1.6.0_17)
Our website uses a COM object to generate JPG images which emulate a GIS system. Everything works well on this config.
I need to setup a new production server, with Windows Server 2008 R2 64 Bit, IIS 7.5
I have tried to install both ColdFusion 9.0.2 (JVM Version 1.6.0_29) as well as ColdFusion 10.0.0 (JVM Version 1.6.0_29).
In both cases, I cannot invoke my COM object. I receive an object instantiation error.
Here is what the CF Log says:
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.
I confirmed that on this server, ColdFusion 9.0.0 (JVM version 1.6.0_14) works, so I'm pretty certain that it is not an object registration error or anything.
I have attempted to install ColdFusion 10.0.0 with JVM version 1.6.0_17, but cannot start the coldfusion application after making these adjustments. Does anyone have any suggestions to either:
Get my COM object to work under a standard 10.0.0 (1.6.0_29) environment
Downgrade Java VM in CF10 to 1.6.0_17
Thanks for your time!
Just to make sure it is a JVM version issue and not something else, I'd try to upgrade the 9.0.0 box to 1.6.0_29 and see if the COM calls suddenly start failing.
You might be chasing a red herring...
I am attempting this, but need help with process to install 1.6.0_29. I installed this by going to this site and downloading the "runtime environment update 29" http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-a rchive-downloads-javase6-419409.html#jre-6u17-oth-JPR
However, adjusting the config file as follows:
java.home=C:/Program Files (x86)/Java/jre6
Makes it so that I cannot start the coldfusion service. Anyone have experience troubleshooting this type of upgrade, and why the CF service won't start?
Download from Oracle Java developer kit (not runtime):
Install JDK via running EXE you downloaded - default install will be fine.
Stop CF - SERVICES.msc stop "ColdFusion 9 Application Server".
Take a copy of CF\runtime\bin\jvm.config - so you got a backup.
Edit CF\runtime\bin\jvm.config find line "java.home=" and comment it out eg:
Add new line like so and save jvm.config:
java.home=C:/Program Files (x86)/Java/jdk1.6.0_nn/jre where nn=29 in this case
Note there the slashes and the location of the JRE (runtime) - you need to point to the one in JDK because the other JRE in C:\Program Files (x86)\Java\jre6 will be missing a DLL.
Start CF via SERVICES.msc.
Yes, we did actually get this too work, after working with Adobe technical support on the issue. Our issue with instantiating a COM object had nothing to do with the JVM. If you have a COM object that you want CF to instantiate, on a 64-bit server, the only trick to remember is to install a 32-bit ColdFusion on the 64 Bit server, and make sure to setup the IIS application pool to support 32-Bit applications. 64-bit ColdFusion will not be able to run a COM object, and this has been the case since CF9.
To get CF10, 32 bit, on a 64 bit Windows server to instantiate our COM object, Adobe Technical Support sent us a .dll file - TypeViewer.dll, which needed to be placed in C:\ColdFusion10\cfusion\lib folder, and then manually registered using regsvr32.exe. Once we did that, ColdFusion 10 32-Bit installed on a 64-Bit server was able to instantiate our COM object.
In order to implement this fix quickly to our customers, we simply added this TypeViewer to our software's installation package, so when you install our software it patches ColdFusion 10.
The Adobe support technician, Ankur Srivastava, was who ended up sending us the corrected TypeViewer.dll. I'm not sure if it is proper protocol to post his email address here so you can get the .dll in question. I also have not followed up to see if Adobe released this as a patch, as I got my solution and moved on to different crisis-du-jour's.
Hope this helps!
It appears that Adobe did take care of this issue in their ColdFusion Update 1:
https://bugbase.adobe.com/index.cfm?event=bug&id=3208222 <--- That's my bug!
I have not confirmed with a test, so if you install update 1 (or update 5 which is what they are on now), can you be a mensch and post if you were successful or not?