File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 9937
    
159

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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can't commit because the transaction is in aborted state
 
Similar Threads
Can't commit because the transaction is in aborted state
Container managed transaction (CMT) doesn't commit transactions
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.] exception
How Jboss calls Ejb methods
UserTransaction and setRollbackOnly