Skip to content
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

ConverterTest fails with vendorName == null #5

Closed
stain opened this issue Sep 12, 2014 · 1 comment
Closed

ConverterTest fails with vendorName == null #5

stain opened this issue Sep 12, 2014 · 1 comment

Comments

@stain
Copy link
Member

stain commented Sep 12, 2014

On 11 September 2014 10:42, Brad Polant brad.polant@corista.com wrote:

Hi
I hope you don't find a foolish sounding question but when I build the
code from

http://stain.github.io/jai-imageio-core/
and run the unit-tests I get (after removing *ignore) I get this

java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi:
Provider
com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderSpi could not be
instan
tiated: java.lang.IllegalArgumentException: vendorName == null!
at
javax.imageio.spi.IIOServiceProvider.(IIOServiceProvider.java:7
6)
at
javax.imageio.spi.ImageReaderWriterSpi.(ImageReaderWriterSpi.ja
va:231)

I checked the Manifest.MF and it seems ok,
Do you mind a quick hint?
Thanks
Brad Polant

Stian:
I had earlier @ignore'd the "test" as it turned out to not really be a unit test at all - for instance it just prints out any error rather than failing on them.

I can replicate this problem, with OpenJDK 1.7.0_55 from LinuxMint 17.

I get the failure on com.sun.media.imageioimpl.stream.ChannelImageInputStreamSpi instead of J2KImageReaderSpi - I guess it could happen on any of them.

It seems to be caused by com.sun.media.imageioimpl.common.PackageUtil which assumes the code is being run from inside a JAR where it can access the Manifest - however during mvn test this is not the case as it is just running from target/classes.

To do it properly through a JAR you would have to move the test to a different module and add jai-image-core as a dependency. I must admit I have not tested this particular scenario, but at least when we are using image-io we use it as a JAR and therefore the SPIs work as intended.

@stain
Copy link
Member Author

stain commented Sep 12, 2014

Fixed for version 1.2-pre-dr-b04-2014-09-12

@stain stain closed this as completed Sep 12, 2014
stain added a commit that referenced this issue Sep 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant