dcm4che: No Image Reader of class com.sun.media.imageioimpl.plugins.jpeg2000.J2KIm...
Hi!
I'm trying to get a servlet to parse a DICOM image. On the console I'm able to do it without a problem but when I try to do it on apache it's failed miserably for other things. I'm asking ImageIO to search for plugins: Code:
1427 [localhost-startStop-1] INFO la.cps.shl7.server.servlet.HL7StartupServlet - Supported Formats: Code:
org.dcm4che2.data.ConfigurationError: No Image Reader of class com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderCodecLib available for format:jpeg2000 Code:
$ unzip -l /home/antoranz/Descargas/java/apache-tomcat-7.0.28/lib/jai_imageio.jar | grep J2KImageReaderCodecLib.class |
Well... I think it's a tomcat problem (somewhere) because wee what happens when I ask the class to be loaded manually with Class.forName():
Code:
java.lang.ClassNotFoundException: class com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderCodecLib |
Ok.... so instead of ln the jar I physically copied it into lib (as if that was going to change something... I knew it would make no difference but). I still can't load the class (I placed the forName() before the ImageIO stuff and it still fails to see the class).
Is there a simple explanation for this behavior? Cause I don't have one. |
Ok.... about the forClass(), I had misnamed the class. Now I'm able to load the class with a Class.forName() (I do it after ImageIO.getPlugin()) but then we're back into problems decoding the image because of the missing codec class:
Code:
java.io.IOException: Error processing DICOM Object |
Ok.... got it. There's a shared object in jai_image (libclib_jiio.so) that has to be accessible as well. I put it in JDK's jre/lib/i386/ directory.
|
All times are GMT -5. The time now is 03:55 PM. |