You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Edward Daniel <wb...@live.cn> on 2018/09/27 09:54:53 UTC
A small bug need fixed.
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这个方法引起的。烦请帮忙解决一下这个问题。
谢谢
Re: A small bug need fixed.
Posted by Woonsan Ko <wo...@apache.org>.
On Fri, Sep 28, 2018 at 9:15 AM Robert Munteanu <ro...@apache.org> wrote:
>
> On Thu, 2018-09-27 at 21:43 -0400, Woonsan Ko wrote:
> > 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?
>
> I think that should be 2.16.x?
Yes. That's the latest stable one:
- http://jackrabbit.apache.org/jcr/downloads.html#v2.16
Woonsan
>
> Robert
>
Re: A small bug need fixed.
Posted by Robert Munteanu <ro...@apache.org>.
On Thu, 2018-09-27 at 21:43 -0400, Woonsan Ko wrote:
> 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?
I think that should be 2.16.x?
Robert
Re: A small bug need fixed.
Posted by Woonsan Ko <wo...@apache.org>.
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 <wb...@live.cn> 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这个方法引起的。烦请帮忙解决一下这个问题。
> 谢谢
>
>