org.jboss.resteasy.spi.UnhandledException:java.lang.NoSuchMethodError:org.hibernate.SessionFactory.openSession()Lorg / hibernate / Session;

时间:2016-02-01 11:14:52

标签: java hibernate maven jboss

  

我正在尝试将hibernate 4.1.10与第三方连接集成   使用maven池C3P0,但我无法打开Session。

following is my pom.xml
 . . .
  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-c3p0</artifactId>
    <version>4.1.10.Final</version>
   </dependency>
   <dependency>
     <groupId>org.hibernate</groupId>
     <artifactId>hibernate-core</artifactId>
     <version>4.1.10.Final</version>
   </dependency>
   . . .
    and  following is my hibernate.cfg.xml file

    . . .
    <property name="hibernate.c3p0.min_size">5</property>
    <property name="hibernate.c3p0.max_size">20</property>
    <property name="hibernate.c3p0.timeout">300</property>
    <property name="hibernate.c3p0.max_statements">50</property>
    <property name="hibernate.c3p0.idle_test_period">3000</property>
    ...
But I am getting above exception. Please help.

0 个答案:

没有答案