Mac OS X + CF 8 + Multi-server install + ImageGetBlob() == FAIL
I have been fighting an issue with ImageGetBlob(). I am trying to run some very simple code:
<cfimage action="read" name="img" source="#expandPath("zoid.jpg")#" />
<cfset moo = ImageGetBlob(img) >
When I run this on my dev macine, which is running Mac OS X with ColdFusion 8 installed as 'multi-server', I get a JRun 500 error, the first few lines of which are:
ROOT CAUSE:
java.lang.NoClassDefFoundError
at coldfusion.image.Image.getImageBytes(Image.java:519)
at coldfusion.runtime.CFPage.ImageGetBLOB(CFPage.java:5642)
There have been 2 other people who are running ColdFusion under similar operating system/server install configurations that get the same error. I have also asked someone running ColdFusion 8 as a 'stand alone' on a Mac and the code works as expected. The code also works as expected on Windows XP running ColdFusion 8 as a 'multi-server install.
Has anyone else seen this problem? If you are running ColdFusion on a Mac, either as a 'stand alone' or 'multi-server', would you mind giving the code above a try (obviously changing the image path) and reply back to say if you were successful or not and what your set up is?
Thanx in advance!



details from my CF admin info page...
OS: OS X 10.5.4
CF: 9,0,1,195765
edition: developer
Java version: 1.5.0_13
Java VM version: 1.5.0_13-119
from the error (can't paste as this is another machine and it's too long to type out :) ) it appears that the com.sun.media.jai.util package is sealed and as such may be conflicting with another instance of the same class somewhere on the classpath.
http://forums.sun.com/thread.jspa?threadID=5293731...
perhaps an update beyond java 6 updater 6 will rectify it.
'I replicated the issue on my system, and it appears that problem is that Apple ships the JAI with their own native library which is version 1.1.2 which exists in /System/Library/Java/Extensions.
Adobe ships JAI 1.1.3 which is inside the CF's library path.
Unfortunately this creates the conflict and the exception you saw.
To fix it add the following to you to java.args in the jvm.config for JRun:
-Djava.ext.dirs=/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext'
2 things:
1. Make sure you backup jvm.config before making any changes.
2. Restart CF after making thsi change.
Elliot: You da man too
Thanks for the fix