I am building a route using the camel-amqp component and I'm following the
example from http://camel.apache.org/amqp.html. When I start up my camel
route I get the following exception. Is there another dependency I'm
missing? I've added camel-core and camel-amqp to my pom.xml.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:457)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [org.apache.qpid.jms.JmsConnectionFactory] for bean with
name 'jmsConnectionFactory' defined in file
[/a/b/c/d/target/classes/META-INF/spring/camel-context.xml]; nested
exception is java.lang.ClassNotFoundException:
org.apache.qpid.jms.JmsConnectionFactory
at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1328)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:591)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1399)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:968)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:735)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:214)
at org.apache.camel.spring.Main.doStart(Main.java:154)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.main.MainSupport.run(MainSupport.java:124)
at org.apache.camel.main.MainSupport.run(MainSupport.java:343)
at org.apache.camel.spring.Main.main(Main.java:87)
... 6 more
Caused by: java.lang.ClassNotFoundException:
org.apache.qpid.jms.JmsConnectionFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1351)
at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1320)
... 21 more
Mark 's gravatar image asked Feb 17 2017 at 07:08 in Camel-Users by Mark

2 Answers

Hi,
Can you try adding org.apache.qpid:qpid-jms-client?
Thanks,
Tomo
Tomohisa Igarashi 's gravatar image answered Feb 17 2017 at 07:29 by Tomohisa Igarashi
That works. Thanks Tomo.
FYI, I tried 2.18.2 and did not have the dependency problem.
Mark 's gravatar image answered Feb 17 2017 at 07:32 by Mark
Facebook Google+ Twitter Linkedin
 Discussion Overview

 Group: Camel-users

 asked: Feb 17 2017 at 07:08

 active: Feb 17 2017 at 07:32

 posts: 3

 users: 2