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

前端 未结 1 1969
梦如初夏
梦如初夏 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:

            5.0.4.Final
    

    and

        
           org.hibernate
           hibernate-entitymanager
           5.0.4.Final
           runtime
      
    

    0 讨论(0)
提交回复
热议问题