Search code examples
javasolrosgisolrjapache-servicemix

Use Solrj in OSGi Container


I have a jax-rs service that i'm deploying into fuse esb which uses solrj to connect to a solr server. I've added the following maven dependancy to the project:

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

Standalone testing works fine, connecting to solrj works fine. BUT when i deploy to the osgi container i get a ClassNotFoundException for classes in the org.apache.noggit package. My question is:

what osgi package should i be using for solrj?


Solution

  • If you use Fuse ESB then its easier to install using features. You can install solr by

    features:install camel-solr
    

    And you can see all the features available out of the box with

    features:list