ies Loading properties file from class path resource [activeMq.properties]
29-Sep-2016 18:06:17.830 WARNING [localhost-startStop-1] org.springframework.web.context.support.XmlWebApplicationContext.refresh Except
ion encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Err
or creating bean with name 'warehousesController': Injection of autowired dependencies failed; nested exception is org.springframework.b
eans.factory.BeanCreationException: Could not autowire field: private com.baosight.template.storeInfo.dao.WarehousesOverviewMapper com.b
aosight.template.bigScreen.controller.WarehousesController.warehousesOverviewMapper; nested exception is org.springframework.beans.facto
ry.CannotLoadBeanClassException: Cannot find class [org.apache.activemq.ActiveMQConnectionFactory] for bean with name 'consumerConnectio
nFactory' defined in file [D:\apache-tomcat-8.5.5_bigSreen\webapps\ROOT\WEB-INF\classes\spring\springMq.xml]; nested exception is java.l
ang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
29-Sep-2016 18:06:17.840 SEVERE [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'warehousesController': Injection of autowired d
ependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.b
aosight.template.storeInfo.dao.WarehousesOverviewMapper com.baosight.template.bigScreen.controller.WarehousesController.warehousesOvervi
ewMapper; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.activemq.Act
iveMQConnectionFactory] for bean with name 'consumerConnectionFactory' defined in file [D:\apache-tomcat-8.5.5_bigSreen\webapps\ROOT\WEB
-INF\classes\spring\springMq.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotati
onBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.
java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.
java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.ja
va:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java
:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.jav
a:838)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.baosight.template.storeInfo.da
o.WarehousesOverviewMapper com.baosight.template.bigScreen.controller.WarehousesController.warehousesOverviewMapper; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.activemq.ActiveMQConnectionFactory] for b
ean with name 'consumerConnectionFactory' defined in file [D:\apache-tomcat-8.5.5_bigSreen\webapps\ROOT\WEB-INF\classes\spring\springMq.
xml]; nested exception is java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnot
ationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotati
onBeanPostProcessor.java:331)
... 22 more
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.activemq.ActiveMQConnectionFact
ory] for bean with name 'consumerConnectionFactory' defined in file [D:\apache-tomcat-8.5.5_bigSreen\webapps\ROOT\WEB-INF\classes\spring
\springMq.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanF
actory.java:628)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFacto
ry.java:597)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1445)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:44
5)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:423)
at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1
177)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116
)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnot
ationBeanPostProcessor.java:545)
... 24 more
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1397)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1344)
... 34 more
项目在eclipse中启动都没报错,我打包想发到测试环境,启动tomcat就报错了
Causedby:java.lang.ClassNotFoundException:org.apache.activemq.ActiveMQConnectionFactory
atorg.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
atorg.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
atorg.springframework.util.ClassUtils.forName(ClassUtils.java:250)
atorg.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)
atorg.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1397)
atorg.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1344)
...34more
这个也是报错的
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。