Iterator<ImageReader> readers = ImageIO.getImageReadersByMIMEType("application/dicom");
//exception here - sometimes
if (readers.hasNext()) {
//dicom supported
try {
BufferedImage image = ImageIO.read(inputFile);
} catch (IOException ex) {
ex.printStackTrace();
}
}
Error handling a request: 96bb43363de0b44e
! java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO
! at com.rfx.cmr.support.ImageConverter.convert(ImageConverter.java:36) ~[cmrapi-1.0.0.jar:na]
...
Did anyone ever experience such an issue. I'm running the converter in a jetty container. My pom.xml has:
<dependency>
<groupId>org.dcm4che</groupId>
<artifactId>dcm4che-imageio</artifactId>
<version>3.3.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
thanks for your help,
best,
Ronny