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)

  • 相关阅读:
    upc组队赛1 黑暗意志【stl-map】
    upc组队赛1 闪闪发光 【优先队列】
    upc组队赛1 流连人间的苏苏
    POJ 2387 Til the Cows Come Home 【最短路SPFA】
    POJ 2421 Constructing Roads 【最小生成树Kruscal】
    qrcode-使用
    submlie 配置php运行
    composer 安装laravel
    composer 配置镜像
    Laravel-队列
  • 原文地址:https://www.cnblogs.com/Libinkai/p/9510353.html
Copyright © 2011-2022 走看看