有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

组织。jboss。放松点。spi。未处理的异常:java。lang.NoSuchMethodError:org。冬眠SessionFactory。openSession()Lorg/hibernate/Session;

I am trying to integrate hibernate 4.1.10 with third party connection pool C3P0 using maven but I am unable to open 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) 个答案