Skip to main content
Inspiring
January 24, 2012
Answered

CF8.01 Enterprise 64 bit OS X JAI error

  • January 24, 2012
  • 1 reply
  • 2882 views

Hi,

We have been using CF8 for years on an xserve running cf8 enterprise (32 bit) single server mode and have had no problems. We recently added a new xserve running OS X Snow Leopard and installed CF8.01 Enterprise 64 bit in multi server mode (currently using default cfusion instance). All of the sites load correctly until we try and process images. We are seeing 2 different errors when trying to resize (or crop) an image:

sealing violation: package com.sun.media.jai.util is sealed

java.lang.SecurityException: sealing violation: package com.sun.media.jai.util is sealed at java.net.URLClassLoader.defineClass(URLClassLoader.java:234) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at

and

Could not initialize class javax.media.jai.JAI

java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI at coldfusion.image.Image.resizeImageWithJAI(Image.java:1189) at coldfusion.image.Image.resize(Image.java:1119) at coldfusion.image.Image.resize(Image.java:1010) at coldfusion.runtime.CFPage.ImageResize(CFPage.java:6210) at

After a server restart we run a test imageResize() script and we see the first error above. Then on subsequent requests we see the second error.

The server is using JDK 1.6.0_29 64bit (Mac OSX default).

I have also setup a test server (CF8.01 Ent 64 bit OS X) which is running on JDK 1.5.0 and the same error occurs.

Has anyone seen this before. I have applied all hotfixes to the main server and not to the test server.

Really tearing my hair out about this one as I can't see why the code which was working on CF8 Standard and Enterprise is now not working.

Any help would be really appreciated I know that CF8 is a bit long in the tooth (waiting for CF10!)

Cheers,

Dave

This topic has been closed for replies.
Correct answer -__cfSearching__-

I know zilch about osx, so take this with a grain of salt .. But the error message suggests you might have multiple versions of the JAI jars in your class path, which could cause that kind of class loader error.  CF ships with a version of JAI (Java Advanced Imaging) built in.  Is it possible your jdk came with another version of JAI pre-installed?

1 reply

-__cfSearching__-Correct answer
Inspiring
January 25, 2012

I know zilch about osx, so take this with a grain of salt .. But the error message suggests you might have multiple versions of the JAI jars in your class path, which could cause that kind of class loader error.  CF ships with a version of JAI (Java Advanced Imaging) built in.  Is it possible your jdk came with another version of JAI pre-installed?

Inspiring
January 25, 2012

Thanks for the suggestion, I don't think there is another version of JAI pre-installed as this is just a normal OS X (Snow Leopard) install. We haven't seen this problem on any of our other OS X installs. The only difference between what we had previously working and what is now not working is Coldfusion Enterprise is installed in multi-server mode instead of standalone (plus 64bit rather than 32bit).

Is there a way to check what jars the default jdk has installed?

Cheers,

Dave

Inspiring
January 25, 2012

On further digging I have managed to find some jai related files in the 1.6 java folder (/System/Library/Java/Extensions). So I removed the matching files from the {jrun_root}/.../cfusion/lib folder. Restarted Coldfusion and bingo! Image functions are now working again.

Question still remains why the multi-instance version of cf breaks where cf std or ent in standalone works?

Cheers,

Dave