I'm trying to create a camel route (similar in principle to the java camel-cdi quickstart example that using a message queue (using the amq endpoint).
I have a working camel camel route (the standard camel-cdi one) and then try to introduce the following dependencies into my pom.xml:
<dependency>
<groupId>io.fabric8.mq</groupId>
<artifactId>mq-fabric</artifactId>
<version>${fabric8.bom.version}</version>
</dependency>
<dependency>
<groupId>io.fabric8.mq</groupId>
<artifactId>camel-amq</artifactId>
<version>${fabric8.bom.version}</version>
</dependency>
But then the route won't start. If I try a
mvn clean camel:run I get output like this:
2014-09-07 16:56:49,006 [weld-worker-2 ] WARN Validator - WELD-001473: javax.enterprise.inject.spi.Bean implementation org.apache.camel.cdi.internal.CamelContextBean@340c3b7f declared a normal scope but does not implement javax.enterprise.inject.spi.PassivationCapable. It won't be possible to inject this bean into a bean with passivating scope (@SessionScoped, @ConversationScoped). This can be fixed by assigning the Bean implementation a unique id by implementing the PassivationCapable interface.
2014-09-07 16:56:49,009 [cdi.Main.main()] INFO MainSupport - Apache Camel 2.13.2 stopping
[ERROR] *************************************
[ERROR] Error occurred while running main from: org.apache.camel.cdi.Main
[ERROR]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:488)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Set<Service> with qualifiers @Default
at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)
at com.google.common.util.concurrent.ServiceManager.<init>(ServiceManager.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:368)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:289)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:135)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:166)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:514)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
[ERROR] *************************************
Any ideas what I'm doing wrong?
Any examples of using amq from java routes?
Thanks
Tim