I believe this is the known issue seen here: http://developer.java.sun.com/developer/bugParade/bugs/4889192.html
The fix is easy, so hopefully we can have this resolved for Tiger (1.5).
BTW, you may want to subscribe to the java-imageio-interest list if you have further IIO-specific questions.
Thanks, Chris
On Thursday, September 25, 2003, at 02:03 PM, Bill Snyder wrote:
Hi All,
I am working on a Jini/RIO based project which has a Jini service that provides the ability to transcode images from one format to another. Everything works quite well but I am running up against an issue with the way that the method javax.imageio.metadata.IIOMetadata.getMetadataFormat has been implemented when loading native metadata formats. Specifically, it attempts to find classes using the following:
Class cls = Class.forName(formatClassName, true, ClassLoader.getSystemClassLoader());
This results in a ClassNotFoundException which gets wrapped into a IllegalStateException. If I make the following call from my code, it finds the class fine:
Class cls = Class.forName(formatClassName, true, this.getClass().getClassLoader());
I believe this is because my class does have the desired class available to it on it's classpath but when the getMetadataFormat() method tries to load the class, it gets a different class loader that doesn't have the class in it's class path. Since I am doing this in a Jini/RIO environment all of the classes needed are downloaded to the service dynamically which doesn't fit well with the issue at hand. Would this be considered a bug/limitation or was this done intentionally? I suppose I could write my own ClassLoader implementation and then set the java.system.class.loader property to point to it but was hoping there was a less painful/more elegant way to solve the problem. I'd like to hear what others think before I head the wrong direction.
Thanks, Bill
======================================================================= ==== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".