zoukankan      html  css  js  c++  java
  • 异常解决:Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

    一、异常如下

    控制台日志:

    严重: 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 [D:IDEAIDEAProjectSSSPcrudoutartifactsSSSPcrud_war_explodedWEB-INFclassescomIveyssspcontrollerEmployeeController.class]; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

    ……

    Caused by: java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

    二、解决方案

    能够很明显看出,翻译一下是不兼容的类转换引起的异常,是 jar 包冲突

    原先,没有显式引入 spring-aop 依赖,只是引入了 spring-aspects 4.0.0版本的依赖,但是在引入 spring-data-jpa 后,就自动将 spring-aop 4.0.0 的版本改为 spring-aop 3.1.4,然后就出现了这个异常。

    解决很简单,显式引入 spring-aop,将它的版本控制为和其它 spring 组件版本一致就可以了。

  • 相关阅读:
    [Asp.net]站点地图SiteMap
    [Asp.Net]最近一个项目的总结
    [Asp.net]说说密码框和只读框
    [工具]推荐一款查看dll依赖工具
    [工具]Serv-U配置教程
    [NHibernate]Nullables
    [NHibernate]NHibernate.Tool.hbm2net
    [NHibernate]使用AttributeNHibernate.Mapping.Attributes
    delphi跨平台SOCKET--System.Net.Socket
    INDY9发送tstream
  • 原文地址:https://www.cnblogs.com/lveyHang/p/11843264.html
Copyright © 2011-2022 走看看