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。

万恶的 one or more listeners failed to start 和 Servlet.init() for servlet [dispatcherServlet] threw exception

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

万恶的 one or more listeners failed to start 和 Servlet.init() for servlet [dispatcherServlet] threw exception

 

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

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

相关文章:

  • 2021-05-14
  • 2021-08-19
  • 2021-12-05
  • 2021-05-26
  • 2021-11-28
  • 2022-01-18
  • 2021-10-28
猜你喜欢
  • 2021-04-25
  • 2021-10-06
  • 2021-05-03
  • 2021-11-20
  • 2021-11-20
  • 2022-12-23
  • 2022-01-11
相关资源
相似解决方案