File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes JAI Exception running a JDK1.4 code in JDK1.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JAI Exception running a JDK1.4 code in JDK1.3" Watch "JAI Exception running a JDK1.4 code in JDK1.3" New topic

JAI Exception running a JDK1.4 code in JDK1.3

Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
I am facing a situation here with the implementation of JAI which simply refuses to get resolved. I am desperately hoping someone out here can provide some helpful insight into this problem.
My application, which utilizes the JAI API works without any problems in Websphere when the JDK version used is 1.4. However, since the application is to be finally deployed on a cliebt server which is currently using JDK1.3, I had to do the same with my local application. And ever since I've done that I'm repeatedly facing the following exception:

The code which generates the above exception is:

The third line above is the one which throws the exception.

Currently in the JDK1.3 based application, if i make any change to code and then restart the server it seems to work fine, but as soon as it has run once it always generates the error on successive calls unless the server is restarted. Migrating or restarting the client server is out of the question.
Hope someone can rescue me from this predicament.

Joe Ess

Joined: Oct 29, 2001
Posts: 9189

This is a known bug that is fixed for jdk 1.4 and higher. I haven't tried, but the fix in your case appears to be to keep a reference to JAI alive to prevent it from being garbage collected.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: JAI Exception running a JDK1.4 code in JDK1.3
It's not a secret anymore!