java.lang.AbstractMethodError deploying an application (Spring 4 MVC+Hibernate 4/5)

前端 未结 1 1968
梦如初夏
梦如初夏 2020-12-18 09:33

I have an application (Spring 4 MVC+Hibernate 4+MySQL+Maven integration example using annotations) , integrating Spring with Hibernate using annotation based configuration b

相关标签:
1条回答
  • 2020-12-18 10:11

    An AbstractMethodError is a subclass of IncompatibleClassChangeError, whose javadoc reads:

    Thrown when an incompatible class change has occurred to some class definition. The definition of some class, on which the currently executing method depends, has since changed.

    That is, a class A depends on some other class B, that has been changed in an incompatible way since A was compiled, i.e. you have the wrong version of some dependency in your classpath.

    You might wish to verify that are really using the version of hibernate spring asks for. I stress this because you claim to use Hibernate 4, but actually include Hibernate 5 dependencies in your pom.xml:

            <hibernate.version>5.0.4.Final</hibernate.version>
    

    and

        <dependency>
           <groupId>org.hibernate</groupId>
           <artifactId>hibernate-entitymanager</artifactId>
           <version>5.0.4.Final</version>
           <scope>runtime</scope>
      </dependency>
    
    0 讨论(0)
提交回复
热议问题