SpringPersistenceUnitInfo :: AbstractMethodError

后端 未结 3 1815
借酒劲吻你
借酒劲吻你 2020-12-06 19:23

I have an application using Spring 3.0.5, JPA2 and Hibernate 3.6.7. Maven\'s handling my dependency management. Here\'s a pom excerpt:


  &         


        
相关标签:
3条回答
  • 2020-12-06 19:48

    You are mixing artifacts from Spring 2.x and 3.x.

    Replace old versions of spring-hibernate3 and spring-jpa with

    <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-orm</artifactId>
         <version>${spring.version}</version>
         <scope>compile</scope>
    </dependency> 
    
    0 讨论(0)
  • 2020-12-06 20:04

    I had a very similar problem with Hibernate 4.x, Spring 3.x, JPA 2.x, and CXF 2.7.5. I removed the reference to the spring-jpa artifact in my maven POM file, and inserted your recommended snippet. Worked magic! I no longer see the exception. Thanks!

    0 讨论(0)
  • 2020-12-06 20:06

    I had exactly the same problem. I was hibernate validator (4.2), tomcat 6 and spring 3.0.6. But I also upgraded hibernate from 3.2 to 3.6, but I forgot to remove the hibernate-entitymanager.jar (which is an old hibernate jar) from the classpath.

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