ChadDavis wrote:
I'm following the bit of a tutorial found at:

http://wiki.apache.org/jackrabbit/RemoteAccess

When I try to connect, I get an error that seems to indicate that the
appropriate factory can't be found.  I have put this appropriate jar
on the classpath, however, as the tutorial says.   Here's the error:

The factory is in jackrabbit-jcr2spi which also needs to be on the classpath.

The general scheme is as follows: The GenericRepositoryFactory in jcr-commons delegates to specific repository factories using service lookup. jackrabbit-jcr2spi provides a RepositoryFactory for creating SPI based repositories. However jcr2spi needs a RepositoryServiceFactory for creating the corresponding SPI implementation. The name of that RepositoryServiceFactory is passed inside the parameter map (org.apache.jackrabbit.spi.RepositoryServiceFactory). So for things to work you need jackrabbit-jcr2spi which provides the RepositoryFactory for SPI based repositories and spi2whatever which provides the RepositoryServiceFactory named by the org.apache.jackrabbit.spi.RepositoryServiceFactory value in the parameter map.


[2010-01-05 17:45:02,973] ERROR ContentRepositoryHelper: Failure
initializing content repository: javax.jcr.RepositoryException: No
repository factory can handle the given configuration:
{org.apache.jackrabbit.spi2davex.uri=http://localhost:8080/server/default/jcr:root,
org.apache.jackrabbit.spi.RepositoryServiceFactory=org.apache.jackrabbit.spi2davex.Spi2davexRepositoryServiceFactory}
        at 
org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:94)
        at 
org.apache.jackrabbit.commons.GenericRepositoryFactory.getUriRepository(GenericRepositoryFactory.java:143)
        at 
org.apache.jackrabbit.commons.GenericRepositoryFactory.getRepository(GenericRepositoryFactory.java:88)
        at 
org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:88)

Do I have to do something other than drop the
jackrabbit-spi2dav-2.0-beta3.jar in to the classpath ?

The direct dependencies for this case are:

jackrabbit-jcr-commons
jackrabbit-spi2dav
jackrabbit-jcr2spi

Michael

Reply via email to