Hibernate + spring error

前端 未结 2 502
余生分开走
余生分开走 2020-12-11 23:59

I\'m trying to build an app with hibernate + spring + JFS, but I got this errors when I run the app, I\'ve searched about this but I couldn\'t find anything.

I thin

相关标签:
2条回答
  • 2020-12-12 00:26

    I encountered similar error. In my case, there was conflict between following depdencies :

    1. Hibernate Annotations :

      <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-annotations</artifactId>
       <version>3.5.6-Final</version>
      </dependency>
      
    2. Hibernate Commons Annotations :

      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-commons-annotations</artifactId>
        <version>3.2.0.Final</version>
      </dependency>
      

    I resolved the conflict by removing both the dependencies and using following one :

    Hibernate Commons Annotations » 5.0.1.Final

         <dependency>
          <groupId>org.hibernate.common</groupId>
          <artifactId>hibernate-commons-annotations</artifactId>
          <version>5.0.1.Final</version>
         </dependency>
    

    Hope this might help someone.

    0 讨论(0)
  • 2020-12-12 00:36

    Looks to me like you've got incompatible jars on your classpath. If you're not using Maven or another dependency management tool I suggest that you do.

    If you are using Maven check for specified dependencies where versions do not match.

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