start « Transaction « JPA Q&A

1. Hibernate: Transaction not successfully started (Threaded webapp) Problem!

I am having this serious problem in a web-app that is using a thread to listen on a port for packets and process those packets. Processing of a packet involves database transactions, ...

2. Hibernate session.beginTransaction() call and Mysql Start Transaction

When I issue the command

// do something
I don't see a corresponding Start Transaction command issue to my database. Can any body explain to why it is not there and how mysql ...

3. Hibernate transaction not successfully started

Consider this simple Hibernate scenario:

session = getHibernateSession();
tx = session.beginTransaction();
SomeObject o = (SomeObject) session.get(SomeObject.class, objectId);
This code produces the following exception:
org.hibernate.TransactionException: Transaction not successfully started
    at org.hibernate.transaction.JDBCTransaction.commit(

4. is it ok to start a Hibernate transaction inside a JTA tx?

I have a session bean method which has a container managed tx associated with it. It calls a method on a DAO class, which has: tx = s.beginTransaction(); .. tx.commit(); inside it. The reason being, this method could be called from within an already running JTA tx, or standalone, in which case, it would have it's own tx. Is there a ...

5. I can establish a session but can't start a transaction.

I followed the "Getting Started" at and the "Quickstart with Tomcat" at ... start.html I'm trying to run the suggested code in an HttpServlet: Code: ... public void doGet( ... try { Session session = HibernateUtil.currentSession(); ...

6. Urgent!Transaction not successfully started!

Hibernate version:3.1 Database:SQL Server 2005 with SP1 WebServer:Tomcat 5.5.20 IDE:Eclipse 3.2 I can not use transaction!!! Code between sessionFactory.openSession() and session.close(): try { session = HSessionFactory.getSession(); tx = session.beginTransaction(); Query query = session .createQuery("from Users as u where = '" + userName + "' and u.pwd='" + pwd + "'"); if (query != null) { List list = query.list(); if ...

7. Transaction not successfully started

Newbie Joined: Wed Aug 08, 2007 3:51 am Posts: 6 Hello all I'm working with hibernate3.jar + spring I had a transactionfilter to start and terminate a hibernate session. Code: public class HibernateFilter implements Filter { public void destroy() { // TODO Auto-generated method stub } ...

8. Transaction not successfully started

Hibernate 3.1 What does this exception mean? and what can it be the cause of it? I had never seen it before. It happens when I am going to commit, the program is a quite complex program that gets a lot of data and insert them in the database. If somebody wants, i can put some concrete code, I am not ...

9. Why to start DB transaction for createCriteria/createQuery?

Well, you actually do need a transaction. A transaction represents a unit of work, and doing a select statement is indeed work. Many times in the past, the JDBC connection would create the transaction if you didn't do it yourself explicitly. It was also friendly on closes. It's not so freindly anymore.

10. Transaction not started error

11. How to force hibernate to start transaction?

Connection connection = session.connection(); connection.setAutoCommit(false); tx = session.beginTransaction(); tx.begin(); String statement = "{call SWIA.CALC_INIT(?,?,?,?,?,?,?,?,?,?,?)}"; CallableStatement cs = connection.prepareCall(statement); //...(set parameters) cs.execute String statement2 = "{call SWIA.CALC_C(?,?,?)}"; CallableStatement cs2 = connection.prepareCall(statement); //...(set parameters) cs2.execute //...(get results) //... I execute many many procedures with that way.... tx.rollback(); ...