EJB: Rollback Causing Illegal State Exception with Statefull EJB.

(Doc ID 1121045.1)

Last updated on APRIL 05, 2018

Applies to:

Oracle Weblogic Server - Version 9.2 to 10.3.3
Information in this document applies to any platform.


If you have a Stateful Session Bean with BMT (Bean Managed Transaction), and a Stateless Session Bean with CMT (Container Managed Transaction) with the Requires attribute, when  invoking the Stateful Session Bean from a servlet, which in turn invokes the Stateless Session Bean. The servlet creates an instance of the Stateful Session Bean. The Stateful Session Bean starts a transaction with UserTransaction.begin(). If the Stateless Session Bean methods call setRollbackOnly, any subsequent call from the Stateful Session Bean to rollback or commit the transaction receives shows the below exception:

<Mar 25, 2010 11:47:21 AM EDT> <Notice> <Stdout> <BEA-000000> <transaction Status : 6> java.lang.IllegalStateException: Transaction does not exist
at weblogic.transaction.internal.TransactionManagerImpl.rollback(TransactionManagerImpl.java:298)
at weblogic.transaction.internal.TransactionManagerImpl.rollback(TransactionManagerImpl.java:293)




Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms