Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/342.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java org.hibernate.TransactionException:JDBC回滚失败异常_Java_Hibernate_Exception - Fatal编程技术网

Java org.hibernate.TransactionException:JDBC回滚失败异常

Java org.hibernate.TransactionException:JDBC回滚失败异常,java,hibernate,exception,Java,Hibernate,Exception,我正在使用Tomcat服务器,我昨天早上启动了它,它一直运行到今天早上,但当我尝试登录我的应用程序时,它显示: org.hibernate.TransactionException: JDBC rollback failed 问题是什么?这里有任何持久会话还是会话工厂为空?我遇到了问题, ie i附加了一个名为c3p0-0.9.1.jar的不同jar文件,并在hibernate-cfg.xml文件中添加了一些行 代码是: <?xml version="1.0" encoding="UT

我正在使用Tomcat服务器,我昨天早上启动了它,它一直运行到今天早上,但当我尝试登录我的应用程序时,它显示:

org.hibernate.TransactionException: JDBC rollback failed
问题是什么?这里有任何持久会话还是会话工厂为空?

我遇到了问题, ie i附加了一个名为c3p0-0.9.1.jar的不同jar文件,并在hibernate-cfg.xml文件中添加了一些行

代码是:

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>                         
   <property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/<your db name></property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.connection.password">test</property>
    <property name="hibernate.connection.autocommit">false</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.format_sql">true</property>
    <property name="hibernate.jdbc.batch_size">50</property>

           //Here is the extra code for handling the above problem.....

    **<property name="hibernate.c3p0.max_size">1</property>
    <property name="hibernate.c3p0.min_size">0</property>
    <property name="hibernate.c3p0.timeout">5000</property>
    <property name="hibernate.c3p0.max_statements">1000</property>
    <property name="hibernate.c3p0.idle_test_period">300</property>
    <property name="hibernate.c3p0.acquire_increment">1</property>**
</session-factory>
</hibernate-configuration>

org.hibernate.dialogue.mysql5innodbdialogue
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/
根
测试
假的
更新
真的
真的
50
//下面是处理上述问题的额外代码。。。。。
**1
0
5000
1000
300
1**
请张贴完整的stacktrace。