This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Can't commit because the transaction is in aborted state Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Can Watch "Can New topic
Author

Can't commit because the transaction is in aborted state

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
the whole error message is
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state

I am using EJB3 Container-Managerd Entity Managers.
NetBean 5.5.1 JBOSS 4.2.2GA

the following is some segment of my stateless session bean

@PersistenceContext
private EntityManager em;

@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void createItem (String itcode, String ituom, double itcost, double itsrp, double itwhbal, String expired){
Item item = new Item(itcode, ituom, itcost, itsrp, itwhbal, expired) ;
em.persist(item);
}

I intentionally add a duplicate key in itcode (the primary key field), but the error message is
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state

why the transaction is in aborted state?
how to fix it?
also, is it related to JBOSS server problem?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9924
    
158

Peter,

Let's continue this discussion in your other thread at http://www.coderanch.com/t/91092/JBoss/commit-because-transaction-aborted-state


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't commit because the transaction is in aborted state
 
Similar Threads
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.] exception
Container managed transaction (CMT) doesn't commit transactions
Can't commit because the transaction is in aborted state
How Jboss calls Ejb methods
UserTransaction and setRollbackOnly