【问题标题】:Use Solrj in OSGi Container在 OSGi 容器中使用 Solrj
【发布时间】:2013-03-18 23:14:42
【问题描述】:

我有一个 jax-rs 服务,我正在部署到 fuse esb 中,它使用 solrj 连接到 solr 服务器。我在项目中添加了以下 maven 依赖项:

<dependency>
    <artifactId>solr-solrj</artifactId>
    <groupId>org.apache.solr</groupId>
    <version>4.1.0</version>
    <type>jar</type>
    <scope>compile</scope>
</dependency> 

独立测试工作正常,连接到 solrj 工作正常。但是当我部署到 osgi 容器时,我得到 org.apache.noggit 包中的类的 ClassNotFoundException。我的问题是:

我应该为 solrj 使用什么 osgi 包?

【问题讨论】:

    标签: java solr osgi solrj apache-servicemix


    【解决方案1】:

    如果您使用 Fuse ESB,则使用功能更容易安装。您可以通过

    安装 solr
    features:install camel-solr
    

    您可以查看所有开箱即用的功能

    features:list
    

    【讨论】:

    • 我最终只是将 solrj jar 包装在一个带有 Eclipse 插件项目的 osgi 包中。但是您的解决方案要容易得多。谢谢。
    猜你喜欢
    • 1970-01-01
    • 2016-03-23
    • 2016-11-27
    • 2013-05-18
    • 2012-05-02
    • 2011-06-30
    • 1970-01-01
    • 2014-03-31
    • 2015-11-26
    相关资源
    最近更新 更多