zoukankan      html  css  js  c++  java
  • 万恶的 one or more listeners failed to start 和 Servlet.init() for servlet [dispatcherServlet] threw exception

    maven+ssm项目启动报错:

    org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [X:\IDEAWorkspace\easyPartTimeJob\target\easyPartTimeJob-1.0-SNAPSHOT\WEB-INF\classes\com\fireDragon\bo\AccountInfoBO.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 [X:\IDEAWorkspace\easyPartTimeJob\target\easyPartTimeJob-1.0-SNAPSHOT\WEB-INF\classes\com\fireDragon\bo\AccountInfoBO.class]; nested exception is java.lang.IllegalArgumentException

    日志很详细,但是我找了很久都找不出原因(看不懂)。百度上的博客看了个遍。然后我对着一个网上的ssm整合教程重新写了一个整合demo,这个可以启动了,于是我得到了一个可以跑起来的项目。

    我对照各个层次的代码发现没错后,对比pom文件,使用控制变量法一个一个排除(哭卿卿),发现了罪魁祸首:一个jar包:(删除这个东西即可启动项目),原因是jar包冲突了,ORZ。

    然后访问一个我写的测试接口,发现报了一个新的错误:

    我的是Spring版本问题,由5.0.8换为4.3.9即可(大侠随机应变)。解决这两个问题后,我的demo就可以跑通各层了。

    建议:如果整合时确保代码无误,可以往spring版本及jar包冲突方面考虑!这种错误有可能人人不一样,但是我找个BUG找了三天,觉得还是有必要记录一下(doge)

  • 相关阅读:
    我的学习思维:有关时间的管理
    Eureka的故事,专注能让你看到别人看不到的事情
    善用思维导图来整理发散的思维
    二八原理:人才招聘中的二八原理
    二八原理:员工激励中的二八原理
    二八原理:员工的三种类型
    二八原理:你必须知悉的二八原理
    Java程序员笔试、面试题目
    String StringBuffer StringBuilder
    log4j的使用详细解析
  • 原文地址:https://www.cnblogs.com/Libinkai/p/9510353.html
Copyright © 2011-2022 走看看