2016-08-15 7 views
0

私はちょうどどのような依存関係が休止状態を使用する必要があるのだろうか?私は私のポンポンでクラスが見つかりません - hibernate5 LocalSessionFactoryBean

<dependencies> 
     <dependency> 
      <groupId>org.glassfish.jersey.containers</groupId> 
      <artifactId>jersey-container-servlet</artifactId> 
      <version>2.23.1</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-web</artifactId> 
      <version>4.3.2.RELEASE</version> 
      <scope>compile</scope> 
     </dependency> 

     <dependency> 
      <groupId>commons-logging</groupId> 
      <artifactId>commons-logging</artifactId> 
      <version>1.1</version> 
      <exclusions> 
       <exclusion> 
        <groupId>javax.servlet</groupId> 
        <artifactId>servlet-api</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 

     <dependency> 
      <groupId>org.glassfish.jersey.ext</groupId> 
      <artifactId>jersey-spring3</artifactId> 
      <version>2.23.1</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-jdbc</artifactId> 
      <version>4.3.2.RELEASE</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/net.sourceforge.jtds/jtds --> 
     <dependency> 
      <groupId>net.sourceforge.jtds</groupId> 
      <artifactId>jtds</artifactId> 
      <version>1.3.1</version> 
     </dependency> 



     <!-- https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp --> 
     <dependency> 
      <groupId>commons-dbcp</groupId> 
      <artifactId>commons-dbcp</artifactId> 
      <version>1.4</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core --> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-core</artifactId> 
      <version>5.2.1.Final</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.springframework/spring-orm --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-orm</artifactId> 
      <version>4.1.6.RELEASE</version> 
     </dependency> 


     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>4.12</version> 
      <scope>test</scope> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin --> 
     <dependency> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>exec-maven-plugin</artifactId> 
      <version>1.2.1</version> 
     </dependency> 

    </dependencies> 

を次があるが、私は、誰かが私が行方不明ですどの依存関係へと助言することができるだろう

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate5.LocalSessionFactoryBean] for bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.orm.hibernate5.LocalSessionFactoryBean 

をクラスが見つからない例外を取得しているように見えますか?休止5用

おかげ

答えて

2

サポートは、スプリング-ORMの4.2リリースから追​​加されました。最新の4.3.2-Releaseを使用することができます。

<dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-orm</artifactId> 
     <version>4.3.2.RELEASE</version> 
</dependency> 
関連する問題