Karaf - getting "Unable to load class" when installing feature
<p>I am new to cxf and camel and I am running into some issues when trying to use JacksonJsonProvider.</p>

<p>I am trying to define a cxf service endpoint which consumes a json object and sends the request to a camel route. The camel route is not important for my issue.</p>

<p>In my blueprint.xml file I have defined a bean for JacksonJsonProvider:</p>

<pre><code>&lt;bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/&gt;
</code></pre>

<p>When I try to install my feature in karaf I receive the following error:</p>

<blockquote>
  <p>BlueprintContainerImpl           | ?<br>
  ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Unable to start
  blueprint container for bundle test-mgw-api
  org.osgi.service.blueprint.container.ComponentDefinitionException:
  Unable to load class org.codehaus.jackson.jaxrs.JacksonJsonProvider
  from recipe BeanRecipe[name='jsonProvider']</p>
</blockquote>

<p>I have already added the correct dependency to my pom.xml</p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
        &lt;version&gt;1.9.13&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>

<p>There must be something simple I am missing here, but I have spend many hours to figure it out now and I am getting nowhere.
<strong>Does anybody know what I am doing wrong here?</strong></p>

<p>I have provided my code below here.</p>

<p><strong>Service interface:</strong></p>

<pre><code>@Path("/auth/")
public interface AuthService {

    @POST
    @Path("/login")
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    Response login(LoginRequest loginRequest);

    @GET
    @Path("/person/get/{id}/")
    @Produces("application/xml")
    Response getPerson(@PathParam("id") String id);

    @DELETE
    @Path("/person/delete/{id}")
    void deletePerson(@PathParam("id") String id);
}
</code></pre>

<p><strong>Request model:</strong></p>

<pre><code>@XmlRootElement(name="Login")
public class LoginRequest {
    private String username;
    private String password;
    private int loginType;

    public LoginRequest(String username, String password) {
        this.username = username;
        this.password = password;
        this.loginType = 1;
    }

    public LoginRequest() {
    }
}
</code></pre>

<p><strong>Blueprint.xml</strong></p>

<pre><code>&lt;blueprint
        xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
        xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
        xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
        xsi:schemaLocation="
        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"&gt;

        &lt;cm:property-placeholder persistent-id="test.mgw.cxf.receive" update-strategy="reload"&gt;
            &lt;cm:default-properties&gt;
                &lt;cm:property name="CXFserver" value="http://localhost:8989/"/&gt;
                &lt;cm:property name="service" value="rest" /&gt;
            &lt;/cm:default-properties&gt;
        &lt;/cm:property-placeholder&gt;

        &lt;bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/&gt;

    &lt;cxf:rsServer id="rsServer" address="${CXFserver}${service}"
                  serviceClass="test.mgw.api.AuthService"
                  loggingFeatureEnabled="true" loggingSizeLimit="20"&gt;
        &lt;cxf:providers&gt;
            &lt;ref component-id="jsonProvider"/&gt;
        &lt;/cxf:providers&gt;
    &lt;/cxf:rsServer&gt;
&lt;/blueprint&gt;
</code></pre>