0 Replies Latest reply on Mar 5, 2015 5:04 PM by szarekar

    Error running camel project - https://github.com/christian-posta/file-rest-blog/blob/master/README.md

    szarekar

      Hi

      I downloaded the project from gethub

       

      https://github.com/christian-posta/file-rest-blog/blob/master/README.md


      serviceclass is

      I tried running the project using two ways -

      import javax.ws.rs.*;

      import javax.ws.rs.core.Context;

      import javax.ws.rs.core.Response;

      import javax.ws.rs.core.UriInfo;

       

       

      @Path("/customerservice/")

      public class CustomerServiceResource {

       

       

          // NOTE: The instance member variables will not be available to the

          // Camel Exchange. They must be used as method parameters for them to

          // be made available

          @Context

          private UriInfo uriInfo;

       

       

          public CustomerServiceResource() {

          }

       

       

          @GET

          @Path("/customers/{id}/")

          @Produces("text/xml")

          public Customer getCustomer(String id) {

              return null;

          }

       

      1) one in jboss develpoer studio and ran as local camel content and i get this error - I changed pom.xml to run this

      I have attached Pom.xml

       

      However when i build and point HTTP tool(point ) to the endpoint i get the following error

      pls help

      qtp1549807005-31] JAXRSInInterceptor WARN No root resource matching request path /route/customerservice/customers/123 has been found, Relative Path: /customerservice/customers/123. Please enable FINE/TRACE log level for more details.

      [ qtp1549807005-31] WebApplicationExceptionMapper WARN javax.ws.rs.NotFoundException

      at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:186)

       

      2) I ran your project through command line as mavn clean intall camel:run

      (for this i used the same pom.xml which i got when downloaded your project)

      But when i try to access  http://localhost:9090/route/customerservice/customers/123 from (http tool postman) - I got status 404

       

      ##################################### camel.xml

      <cxf:rsServer id="rsServer" address="http://localhost:9090/route"

                        serviceClass="com.fusesource.samples.CustomerServiceResource"/>

       

          <bean id="customerServProcessor" class="com.fusesource.samples.CustomerServiceProcessor"/>

          <bean id="routeBuilder" class="com.fusesource.samples.CustomerServiceRoute"/>

          <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

              <routeBuilder ref="routeBuilder"/>

          </camelContext>