QA:Initialization of bean failed; nested exception is java.lang.AbstractMethodError

Posted 只为成功找方向,不为失败找借口

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了QA:Initialization of bean failed; nested exception is java.lang.AbstractMethodError相关的知识,希望对你有一定的参考价值。

Q:

<hibernate.version>5.2.10.Final</hibernate.version><dependency>
  <groupId>org.springframework.data</groupId>
  <artifactId>spring-data-jpa</artifactId>
  <version>2.0.2.RELEASE</version>
</dependency>

 

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userDao‘: Initialization of bean failed; nested exception is java.lang.AbstractMethodError

A:

原因

  1. 直接原因:不能实例化bean。
  2. 间接原因:版本冲突

解决

降低 spring-data-jpa 的版本

<version>1.11.9.RELEASE</version>

以上是关于QA:Initialization of bean failed; nested exception is java.lang.AbstractMethodError的主要内容,如果未能解决你的问题,请参考以下文章

BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type

BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type

No qualifying bean of type报错问题处理

No qualifying bean of type:scanBasePackages

解决 No qualifying bean of type 问题

org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type错误的解决办法