Annotations are not working in when using CamelSpringTestSupport

Solution Verified - Updated -

Issue

  • I used @Autowired annotation in my test class extending CamelSpringTestSupport
  • But I am still getting the below error
org.apache.camel.FailedToCreateRouteException: Failed to create route simple-route at: >>> Transform[bean[ref:myTransformer]] <<< in route: Route(simple-route)[[From[timer:foo?period=2000]] -> [Transf... because of No bean could be found in the registry for: myTransformer
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1071)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
.
.
Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: myTransformer
    at org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:94)
.
.

Environment

  • RedHat JBoss Fuse
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.