Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

javax.transaction.TransactionRolledbackException: com.ibm.websphere.csi.CSITransactionRolledbackExce

84 views
Skip to first unread message

nnaveen5

unread,
Mar 16, 2004, 11:30:36 AM3/16/04
to


I am using a architecture involving Struts and Stateless Session Beans.
Also The appserver is Websphere and Oracle 9i is the databased.
I have configured a Datasource 5.0 in Websphere.

The architecture is something like this

I have a class called delegate which gets the information from the screen and calls a Stateless Session Bean which we call SessionFacade and which in turn calls the single/mutilple StatelessSessionBeans (called plain BusinessBean) which pertain to business functionalities.The businessbeans in turn call a DAO layer which execute the
DB specific functions.

The transaction commit is done at the façade level using JTS .
We are also using local interfaces instead of remote interfaces.

In one such particular method, I am calling a façade which in turn calls a bean which in turn calls a DAO method which executes a Stored Procedure.(which executes in 50ms)
The SP executes perfectly and return the value to the bean. And the bean returns the value to the façade correctly.
However at the return statement in the façade,where the container (I think calls the commit for the transaction) the following exception is thrown.
This is happening for two methods for where I am using Stored Procedures.

Exception Stack Trace :

javax.transaction.TransactionRolledbackException: com.ibm.websphere.csi.CSITransactionRolledbackException: at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:546) at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategyjava:128) at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:531) at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2801) at com.mellon.eg0.iq.business.core.interfaces.entity.EJSLocalStatelessBorrowerBean_2b9ffa77.maintainBorrowerDetailInfo(Unknown Source) at com.mellon.eg0.iq.webapp.delegate.BorrowerDelegate.updateBorrowerDetailInfo(BorrowerDelegate.java:937) at com.mellon.eg0.iq.webapp.action.entity.BorrowerAction.updateBorrowerDetailInfo(BorrowerAction.java:1921) at java.lang.reflect.Method.invoke(Native Method) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) at org.apache.strutsaction.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibmws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatch.............

I tried this without setting any transaction attribute.
I then tried it setting the transaction attribute for the façade and bean as Required.
And then I tried setting the transaction attribute for the façade only with value Required.


I then searched the web.I read one article where someone said setting the transaction attribute as Required New for the Bean and Required for the Façade would work.
However upon setting such values ,I got the exception the stacktrace of which I have given below

[3/13/04 12:25:46:225 GMT+05:30] 4c64be97 LocalTransact E J2CA0024E: Method commit, within transaction branch ID {XID: formatId(1df93), gtrid_length(4), bqual_length(0), data(857E0F4D)} of resource pool AfcoOracleDs, caught com.ibm.ws.exception.WsException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: Logical handle no longer valid.
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:251)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:172)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:125)
at com.ibm.ws.rsadapter.AdapterUtil.translateSQLException(AdapterUtil.java:917)
at com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl.commit(WSRdbSpiLocalTransactionImpl.java:198)
at com.ibm.ejs.j2c.LocalTransactionWrapper.commit(LocalTransactionWrapper.java:217)
at com.ibm.ejs.jts.jta.onephase.OnePhaseResourceImpl.commit_one_phase(OnePhaseResourceImpl.java:147)
at com.ibm.ejs.jts.jts.ResourceVector.beforePrepare(ResourceVector.java:339)
at com.ibm.ejs.jts.tran.EventCallback.executeCallback(EventCallback.java:161)
at com.ibm.ejs.jts.tran.EventCallback.executeCallbackTree(EventCallback.java:132)
at com.ibm.ejs.jts.tran.EventCallback.executeCallbackTree(EventCallback.java:123)
at com.ibm.ejs.jts.tran.EventPrepare.ExecuteBeforePrepareCallbacks(EventPrepare.java:312)
at com.ibm.ejs.jts.tran.EventPrepare.event_LocalPrepareWork(EventPreparejava:287)
at com.ibm.ejs.jts.tran.EventPrepare.event_BecomeCoordinator(EventPrepare.java:970)
at com.ibm.ejs.jts.tran.EventControl.event_EndTopLevel(EventControl.java:295)
at com.ibm.ejs.jts.tran.TrecInterface.end(TrecInterface.java:89)
at com.ibm.ejs.jts.jts.TerminatorImpl.commit(TerminatorImpl.java:104)
at com.ibm.ejs.jts.jts.CurrentImpl.commit(CurrentImpl.java:248)
at com.ibm.ejs.jts.jts.CurrentSet.commit(CurrentSet.java:316)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:540)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:128)
at com.ibm.ejs.csi.RequiresNew.postInvoke(RequiresNew.java:85)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:531)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2801)
at com.mellon.eg0.iq.business.core.interfaces.entity.EJSLocalStatelessBorrowerBean_2b9ffa77.maintainBorrowerDetailInfo(Unknown Source)
at com.mellon.eg0.iq.business.facade.impl.BorrowerSessionFacadeBean.maintainBorrowerDetailInfo(BorrowerSessionFacadeBean.java:1007)
at com.mellon.eg0.iq.business.facade.interfaces.EJSRemoteStatelessBorrowerFacadeBean_cd03cad5.maintainBorrowerDetailInfo(Unknown Source)
at com.mellon.eg0.iq.business.facade.interfaces._BorrowerSessionFacade_Stub.maintainBorrowerDetailInfo(_BorrowerSessionFacade_Stub.java:1061)
.


I am not able to locate the source of this problem.
Could you pls help me with this ?


Paul Ilechko

unread,
Mar 16, 2004, 11:38:09 AM3/16/04
to
nnaveen5 wrote:
>
>
> I am using a architecture involving Struts and Stateless Session
> Beans. Also The appserver is Websphere and Oracle 9i is the
> databased. I have configured a Datasource 5.0 in Websphere.
>
> The architecture is something like this
>
> I have a class called delegate which gets the information from the
> screen and calls a Stateless Session Bean which we call SessionFacade
> and which in turn calls the single/mutilple StatelessSessionBeans
> (called plain BusinessBean) which pertain to business
> functionalities.The businessbeans in turn call a DAO layer which
> execute the DB specific functions.

Why are the business beans session beans, rather than just plain old
java objects? You can do the transaction on the facade, so it's just
overkill to make these objects EJBs.

>
> The transaction commit is done at the façade level using JTS . We
> are also using local interfaces instead of remote interfaces.

Don't use JTS, use container managed transactions - the facade should be
transaction required.


> In one such particular method, I am calling a façade which in turn
> calls a bean which in turn calls a DAO method which executes a Stored
> Procedure.(which executes in 50ms) The SP executes perfectly and
> return the value to the bean. And the bean returns the value to the
> façade correctly. However at the return statement in the façade,where
> the container (I think calls the commit for the transaction) the
> following exception is thrown. This is happening for two methods for
> where I am using Stored Procedures.

Is your SP doing a commit? If so, it should not be.

nnaveen5

unread,
Mar 17, 2004, 8:50:08 AM3/17/04
to
Sorry,i am using container managed transaction only.
i have given transaction attribute to Required for the facade.
I am just closing the connection but i am not commiting .
Still i am getting the same exception.

0 new messages