【问题标题】:Apache Jackrabbit, connect to localhost through WebDAV protocolApache Jackrabbit,通过WebDAV协议连接到localhost
【发布时间】:2014-06-19 16:41:21
【问题描述】:

我正在运行独立服务器并尝试建立连接:

 try {
       Repository repository = JcrUtils.getRepository("http://localhost:8080/server/");

     } catch (RepositoryException ex) {
       Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
     }

如中所述:http://wiki.apache.org/jackrabbit/RemoteAccess

但是,我得到:

javax.jcr.RepositoryException: Unable to access a repository with the following settings: org.apache.jackrabbit.repository.uri: "the locla host"
The following RepositoryFactory classes were consulted:
    org.apache.jackrabbit.core.RepositoryFactoryImpl: declined
org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
Perhaps the repository you are trying to access is not available at the moment.

我用我的浏览器浏览 jackrabbit 服务器没有问题。

【问题讨论】:

  • 你有没有得到这个工作?

标签: java jackrabbit jcr


【解决方案1】:

你的类路径中有jackrabbit-jcr2dav-*.jar 库吗?

从错误报告看来,所咨询的RepositoryFactory 实例不包括org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory - 这是理解http: URL 的工厂实现。

(除此之外:您缺少这个库,您还需要添加它的依赖项 - jackrabbit-spi2dav-*.jar 等)

【讨论】:

    【解决方案2】:

    确保您在堆栈跟踪中使用正确的 URI 到 WebDAV 服务器条目,但情况似乎并非如此:

    Unable to access a repository with the following settings: org.apache.jackrabbit.repository.uri: "the locla host"
    

    你应该使用"http://localhost:8080/server"

    【讨论】:

    猜你喜欢
    • 2016-03-07
    • 1970-01-01
    • 2014-10-24
    • 1970-01-01
    • 2017-03-11
    • 2021-10-14
    • 2015-11-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多