I have a custom Camel component packaged in a separate jar. As advised here:
http://camel.apache.org/how-do-i-add-a-component.html
I created a file a META-INF/services/org/apache/camel/component/aq (aq is the component scheme name) containing:
class=<full class name>
Everything works When I run a test program standalone. However, when I try deploying it into a container (servicemix, karaf) it cannot resolve the component scheme name:
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route7: Route(route7)[[From[aq:oprDequeuer]] -> [WireTap[properties:... because of Failed to resolve endpoint: aq://queue1 due to: No component found with scheme: aq
Also, when I register the component explicitly:
CamelContext context = getContext();
context.addComponent("aq", new AQComponent(context));
it works fine, including ServiceMix.