3 Replies Latest reply on Aug 12, 2009 4:44 PM by korebantic

    problem being RESTful with camel-restlet and fuse-esb-3.4.0.4

    korebantic

      I'm trying to expose a RESTful consumer "bc" by creating a camel su inside of fuse. I would think this should work, based on the example here: http://servicemix.apache.org/35-using-other-camel-components.html.

       

      My camel SU RouterBuilder looks like:

       

      ...

      from("restlet:http://localhost:8094/users?restletMethod=get")

        .to("jbi:endpoint:http://www.foo.com/integration/simpleBeanService/simpleBean");

      ...

       

      I've added the camel-restlet dependency inside my pom:

       

           

      ...

      org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: restlet:http://localhost:8094/users?restletMethod=get due to: org.apache.camel.RuntimeCamelException: Could not auto create component: restlet

              at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:358)

      ...

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.camel.component.restlet.RestletComponent': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class : Constructor threw exception; nested exception is java.lang.RuntimeException: Unable to fully initialize the Restlet. No Restlet engine available.

              at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

              at java.security.AccessController.doPrivileged(Native Method)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:300)

              at org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:38)

              at org.apache.camel.impl.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:73)

              at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:179)

      </snip>

       

      (full exception attached)

       

      Any suggestions on how to fix this? Has anyone else tried using restlet with camel and fuse esb?