Im your WebSphere Application Server 7, JDK 1.6 and Oracle 11g.

Im always receiving this error when utilizing an ejb.

[7/1/10 17:12:28:770 BOT] 00000013 LocalTranCoor W WLTC0033W: Resource jdbc/oraDS11 folded in cleanup of LocalTransactionContainment. [7/1/10 17:12:28:773 BOT] 00000013 LocalTranCoor W WLTC0032W: One or more local transaction assets were folded back throughout the cleanup of the LocalTransactionContainment.

This is the way im obtaining the connection in the datasource in WAS.

javax.sql.DataSource ds = (javax.sql.DataSource) naming.lookup("DataSource");
conn= ds.getConnection();

Any assistance will be appreciated...

This exception happens when table get locked, so you've locked your table in database so release that lock and commit whatever changes you have carried out.

In the error message, you do some work in the local transaction and not carrying out it. The uncommitted work will get rolledback through the container in the finish from the method (automatically).

This response to Datasource rollback in WAS6.0 summarizes all of this pretty much and also, since there's no real point at paraphrasing it, I am estimating it below.

A LocalTransactionContainment is exactly what you receive even without the a worldwide (XA) transaction. The content signifies that you simply carried out some local transaction work included in that containment scope (method or activity session) after which didn't commit. The default behavior (controlled by conflicting-action) would be to rollback any uncommited work on the finish from the scope. You have many options:

  • Clearly commit the neighborhood transaction

    connection.commit(); // after the work has been performed
  • Alter the databases to make use of auto-commit

    connection.setAutoCommit(true); //

    prior to the connection can be used

  • Put the work inside a global transaction

    Context ic = new InitialContext();
    UserTransaction ut =
    (UserTransaction) ic.lookup("java:comp/UserTransaction");
    // use connection here
  • Alter the conflicting-action to commit
    Choose the 'Servlets' tab on the deployment descriptor editor and then choose the servlet under consideration. Under 'WebSphere Extensions' after which 'Local Transaction' set the 'Unresolved Action' to 'Commit' from the drop-lower menu.

I'd suggest carrying out the job clearly (and reading through the entire answer).