Hi Edward,

My google search leads to this known issue:
- https://jira.apache.org/jira/browse/JCR-4179

Could you try with Jackrabbit 16.x if you're with an earlier version?

Woonsan


On Thu, Sep 27, 2018 at 6:15 AM Edward Daniel <[email protected]> wrote:
>
> Hello all:
> This is my first learning jackrabbit.And there is a small bug.
> The project jackrabbit-firsthops’code:
> Repository repository = JcrUtils.getRepository();
>     Will invoke:
>      Iterator<RepositoryFactory> iterator =
>                 ServiceRegistry.lookupProviders(RepositoryFactory.class);
>     Will invoke:
>       private static void checkClassAllowed(Class<?> clazz) {
>         if (clazz == null) {
>             throw new IllegalArgumentException("class must not be null");
>         }
>
>         if (   clazz != ImageInputStreamSpi.class
>             && clazz != ImageOutputStreamSpi.class
>             && clazz != ImageReaderSpi.class
>             && clazz != ImageTranscoderSpi.class
>             && clazz != ImageWriterSpi.class) {
>             throw new IllegalArgumentException(clazz.getName() + " is not an 
> ImageIO SPI class");
>         }
>     }
>
>     Will throw an exception like this:
> Exception in thread "main" java.lang.IllegalArgumentException: 
> javax.jcr.RepositoryFactory is not an ImageIO SPI class
> at 
> java.desktop/javax.imageio.spi.ServiceRegistry.checkClassAllowed(ServiceRegistry.java:722)
> at 
> java.desktop/javax.imageio.spi.ServiceRegistry.lookupProviders(ServiceRegistry.java:207)
> at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:189)
> at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:109)
> at org.apache.jackrabbit.firsthops.FirstHop.main(FirstHop.java:40)
>     I think this is a bug.
> Thank you.
>
>
> hello,各位:
> 这是我第一次接触jackrabbit,我想这边应该有一个小小的bug。
> 在我第一次运行你们的例子的时候,发现他报了这样一个错:
> Exception in thread "main" java.lang.IllegalArgumentException: 
> javax.jcr.RepositoryFactory is not an ImageIO SPI class
> at 
> java.desktop/javax.imageio.spi.ServiceRegistry.checkClassAllowed(ServiceRegistry.java:722)
> at 
> java.desktop/javax.imageio.spi.ServiceRegistry.lookupProviders(ServiceRegistry.java:207)
> at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:189)
> at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:109)
> at org.apache.jackrabbit.firsthops.FirstHop.main(FirstHop.java:40)
> 我查看了一下源代码,发现是checkClassAllowed这个方法引起的。烦请帮忙解决一下这个问题。
> 谢谢
>
>

Reply via email to