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)

  • 相关阅读:
    MSSQL 跨数据库连接
    powerdesigner逆向工程,从数据库导出PDM
    JS面向对象的程序设计
    数据脚本
    JDK安装与环境变量配置
    sql: 去除数据库表中tab、空格、回车符等特殊字符的解决方法
    用SQL语句获得一个存储过程返回的表
    百度云下载速度慢解决方法
    【WCF全析(一)】--服务协定及消息模式
    【WCF全析(二)】--服务配置部署详解
  • 原文地址:https://www.cnblogs.com/Libinkai/p/9510353.html
Copyright © 2011-2022 走看看