-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing image reader #29
Comments
Plugins are loaded via META-INF/services/javax.imageio.spi.ImageReaderSpi - DOCS Since you're putting multiple plugins in the same jar, this file is overwritten. You'll have to register them manually:
|
OMG thank you! I had a similiar issue dealing after adding TwelveMonkeys PSD/ImageIO plugins and this solved the issue when building the app in an uber-jar! Thought this deserved a shot out as it took an hour of Google-foo to get here lol |
If you're using the maven shade plugin you can also use the following transformer: <transformers>
<!-- needed for jpeg2000 services to be included properly -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers> |
This worked for me |
Hi,
Trying to load the plugin JPEG2000 the JPEG2000 reader is not loaded and it later results in an exception :
org.apache.pdfbox.filter.MissingImageReaderException: Cannot read JPEG2000 image: Java Advanced Imaging (JAI) Image I/O Tools are not installed
at org.apache.pdfbox.filter.Filter.findImageReader(Filter.java:128)
at org.apache.pdfbox.filter.JPXFilter.readJPX(JPXFilter.java:72)
at org.apache.pdfbox.filter.JPXFilter.decode(JPXFilter.java:56)
at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:69)
The issue seems to be that the ServiceRegistry class does not contain the jpeg class, simply because it is not in the classpath. Why is it not in the classpath? Well we're not certain. It is present in the jar we're launching but not in the classpath.
However if we add the jar jpeg2000 to the classpath before our jar-with-dependencies then it does get loaded... eg this works
java -cp jai-imageio-jpeg2000-1.3.0.jar:my-jar-with-dependencies.jar ...
this does not work
java -cp my-jar-with-dependencies.jar ...
Even though my-jar-with-dependencies.jar contains the classes in jai-imageio-jpeg2000-1.3.0.jar
The text was updated successfully, but these errors were encountered: