开发者社区> 问答> 正文

activeMq项目?报错

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就报错了


展开
收起
爱吃鱼的程序员 2020-06-09 10:11:28 447 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    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

    这个也是报错的

    2020-06-09 10:11:46
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Apache RocketMQ 源码解析》 立即下载
Java Spring Boot开发实战系列课程【第16讲】:Spring Boot 2.0 实战Apache Kafka百万级高并发消息中间件与原理解析 立即下载
Apache RocketMQ 持续集成 立即下载