码迷,mamicode.com
首页 > 编程语言 > 详细

springmvc项目启动报错 nested exception is org.springframework.core.NestedIOException

时间:2017-06-27 09:49:40      阅读:1009      评论:0      收藏:0      [点我收藏+]

标签:spring   art   support   inf   hand   pre   register   mode   delegate   

学习springmvc的时候demo启动报错:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/Users/zhanglingxiang/IdeaProjects/springmvc_hellow/out/artifacts/springmvc_hellow_war_exploded/WEB-INF/classes/com/model/HelloController.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn‘t supported yet: file [/Users/zhanglingxiang/IdeaProjects/springmvc_hellow/out/artifacts/springmvc_hellow_war_exploded/WEB-INF/classes/com/model/HelloController.class]; nested exception is java.lang.IllegalArgumentException
    org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290)
    org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
    org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
    org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
    org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438)
    org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428)
    org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:185)
    org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139)
    org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108)
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)

网上查了下是java版本的问题

查找了下mac java安装目录,命令:

/usr/libexec/java_home -V

修改工程jdk版本和intellig ide里面tomcat里的jdk配置,改为1.7,依旧不行。

觉得切换了jdk后应该要重新编译,so recompile,成功了!

springmvc项目启动报错 nested exception is org.springframework.core.NestedIOException

标签:spring   art   support   inf   hand   pre   register   mode   delegate   

原文地址:http://www.cnblogs.com/symen/p/7083306.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!