zoukankan      html  css  js  c++  java
  • 启动异常tried to access method org.springframework.core.GenericTypeResolver.getTypeVariableMap

    在使用spring-data-jpa的发生异常

    Caused by: java.lang.IllegalAccessError: tried to access method org.springframework.core.GenericTypeResolver.getTypeVariableMap(Ljava/lang/Class;)Ljava/util/Map; from class org.springframework.data.util.ClassTypeInformation
    at org.springframework.data.util.ClassTypeInformation.<init>(ClassTypeInformation.java:96)
    at org.springframework.data.util.ClassTypeInformation.<clinit>(ClassTypeInformation.java:42)
    at org.springframework.data.repository.core.support.AbstractRepositoryMetadata.<init>(AbstractRepositoryMetadata.java:43)
    at org.springframework.data.repository.core.support.DefaultRepositoryMetadata.<init>(DefaultRepositoryMetadata.java:41)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepositoryMetadata(RepositoryFactorySupport.java:154)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:125)
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:114)
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:38)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
    ... 34 more

    原因是spring-data-jpa.jar的版本和spring-data-commons-core.jar的版本不匹配所造成的,spring-data-commons-core.jar的版本过高了.

    在发生异常的时候我的版本是:spring-data-jpa-1.0.2.RELEASE.jar和spring-data-commons-core-1.3.0.M1.jar

    更改后:spring-data-jpa-1.0.2.RELEASE.jar和spring-data-commons-core-1.1.0.RELEASE.jar (OK)

    由于这个错误我还遇到:

    java.lang.AbstractMethodError: org.springframework.data.jpa.repository.config.SimpleJpaRepositoryConfiguration.getRepositoryBaseInterface()Ljava/lang/Class;
    

      



  • 相关阅读:
    file_get_contents抓取远程URL内容
    Xshell下VI打开文件中文乱码解决
    YII实现Memcache故障转移的配置办法
    Nginx实现多重IF判断的办法
    CentOS安装NodeJS v0.10.25 + Express
    一个小玩意 PHP实现微信红包金额拆分试玩
    Web Service测试利器 Postman
    CentOS安装Git
    PHP导出CSV UTF-8转GBK不乱码的解决办法
    configure: error: C++ compiler cannot create executables
  • 原文地址:https://www.cnblogs.com/coveted/p/2381757.html
Copyright © 2011-2022 走看看