2 zb51500618 zb51500618 于 2016.04.21 10:35 提问

tomcat 启动报错(急)

今天项目更新够 突然出现这个bug ,都搞不定 求大神 救我!

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commodityController': Injection of resource dependencies failed; nested exception is java.lang.NoClassDefFoundError: Lcom/ronhan/ctoc/dao/CommodityMapper;
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
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)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: Lcom/ronhan/ctoc/dao/CommodityMapper;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2509)
at java.lang.Class.getDeclaredFields(Class.java:1819)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:324)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:285)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:830)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:438)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:549)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303)
... 22 more
Caused by: java.lang.ClassNotFoundException: com.ronhan.ctoc.dao.CommodityMapper
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
... 43 more

5个回答

zb51500618
zb51500618   2016.04.22 16:34
已采纳

哎 真是令人捉急 的东西 最后还是组长牛B ,竟然是Project Faces 里面的Utility Module的勾选问题 完全搞不懂

u010646502
u010646502   2016.04.21 10:39

CommodityMapper.java有吗?
找不到这个类 java.lang.ClassNotFoundException: com.ronhan.ctoc.dao.CommodityMapper

CSDNXIAOC
CSDNXIAOC   2016.04.21 10:55

java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap : Unsupported major.minor version 51.0
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.C......
答案就在这里:tomcat 启动报错
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

w172087242
w172087242   Ds   Rxr 2016.04.21 11:09

你的类com.ronhan.ctoc.dao.CommodityMapper没有部署成功,或者就没有这个类

xioawangba
xioawangba   2016.04.22 09:13

spring 中Lcom/ronhan/ctoc/dao/CommodityMapper;说明你这个CommodityMapper不存在,或者在引用的时候,路径写错啦。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
tomcat8启动报错 Context initialization failed 解决方案
今天导入一个项目启动时,提示Context initialization failed ,说一个ClassNotFoundException,说在一个xml里的bean无法找到,我看了配置文件,是正确的啊。这个类也有,路径也是正确的。调试了一会儿,终于解决了。原来是我部署的tomcat,和我在系统环境变量里配置Path里的tomcat不一致造成的。修改为一致就好了。暂且记下,后续再详细不错异常信息...
tomcat-juli.jar 用于在tomcat启动报错时除错
tomcat-juli.jar 用于在tomcat启动报错时除错
tomcat服务器server配置
在tomcat服务器下配置server.xml文件。tomcat启动报错,可参考该文件。
catalina-jmx-remote.jar
tomcat-catalina-jmx-remote-8.0.21.jar架包,用于jconsole使用时tomcat无法启动报错
关于Tomcat一些启动错误的解决方法
Tomcat启动报错
tomcat使用常见问题可能会有你遇到的个人总结
tomcat的个人使用经验说明,里面详细说明了tomcat常见的几个问题如启动报错,加载不了项目,配置热加载等
没有在tomcat中部署项目启动报错
在学校做了小一年的项目,很久没有自己搭框架了,昨天兴致勃勃的跟着教程熟悉下ssh框架却发现tomcat启动报错,网上很多帖子都说缺jar包,可是我还没加入ssh的架构怎么会缺jar包呢,后来发现是tomcat的问题,我的tomcat服务器里面已经部署了很多项目,可能彼此之间有冲突,换了一个新的tomcat服务器解决了~ 这只是个开始,继续努力~ PS:这是我第一次用博客记录程序员的点滴,以后要
Linux下Tomcat启动报错 Error listenerStartstartup
今天启动Tomcat启动不了,报以下错: org.apache.catalina.core.StandardContext startInternal  SEVERE: Error listenerStart  org.apache.catalina.core.StandardContext startInternal  SEVERE: Context [/******] startu
MyEclipse启动Tomcat正常,Tomcat自启动报错
今天碰到一个很抓狂的问题,在MyEclipse里启动Tomcat不报错,项目正常运行,但是部署到服务器端时莫名奇妙的出现了Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type错误。     起初以为是Tomcat的问题,测试了半天,发现不
eclipse项目启动报错tomcat
解决办法: (1)双击你的项目server (2)设置timeouts的值更大 (3)点击保存,重新启动项目就oK