This discussion is archived
3 Replies Latest reply: Dec 2, 2005 12:52 AM by 843844 RSS

Error in EJB running on WebSphere Application Server v6

843844 Newbie
Currently Being Moderated
Hi,

I am getting the following exception when a transaction ends in
Stateless Session EJB:
[8/4/05 13:04:00:396 CDT] 0000004d LocalTranCoor W   WLTC0033W: Resource
imssDS rolled back in cleanup of LocalTransactionContainment.
[8/4/05 13:04:00:406 CDT] 0000004d LocalTranCoor W   WLTC0032W: One or more
local transaction resources were rolled back during the cleanup of a
LocalTransactionContainment.
[8/4/05 13:04:00:456 CDT] 0000004d SystemOut     O Error en el servlet:
CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
 org.omg.CORBA.TRANSACTION_ROLLEDBACK:
javax.transaction.TransactionRolledbackException:  ; nested exception is:
 com.ibm.websphere.csi.CSITransactionRolledbackException:   vmcid: 0x0
minor code: 0  completed: No
[8/4/05 13:04:00:456 CDT] 0000004d SystemOut     O terminaTransaccion().
Rollback
[8/4/05 13:04:00:456 CDT] 0000004d SystemOut     O
javax.servlet.ServletException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested
exception is:
 org.omg.CORBA.TRANSACTION_ROLLEDBACK:
javax.transaction.TransactionRolledbackException:  ; nested exception is:
 com.ibm.websphere.csi.CSITransactionRolledbackException:   vmcid: 0x0
minor code: 0  completed: No
 at HClinicaPPServlet.service(HClinicaPPServlet.java:597)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1
212)
 at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.
java:629)
 at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
 at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
 at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
 at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
 at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
 at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht
tpInboundLink.java:421)
 at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht
tpInboundLink.java:367)
 at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.j
ava:276)
 at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscrimin
aters(NewConnectionInitialReadCallback.java:201)
 at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewCon
nectionInitialReadCallback.java:103)
 at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManage
r.java:548)
 at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java
(Compiled Code))
 at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java
:934)
 at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.jav
a:1021)
 at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
The EJB is being invoked from a servlet. The servlet calls three methods
from the EJB, the first one initializes a database connection, the second
one executes a query against a SQL Server database and the third method
closes the connection. The exception occurs while calling the third method.
The EJB was working fine in WebSphere Application Server 4.0, but we are
helping this customer migrate to WebSphere Application Server 6, but this
error arised.

The EJB is defined as follows in the ejb-jar.xml deployment descriptor:
  <session id="HistClinicaPP">
   <ejb-name>HistClinicaPPEJB</ejb-name>
   <home>HistoriaClinica.HistClinicaPPHome</home>
   <remote>HistoriaClinica.HistClinicaPP</remote>
   <ejb-class>HistoriaClinica.HistClinicaPPBean</ejb-class>
   <session-type>Stateless</session-type>
   <transaction-type>Bean</transaction-type>
   <resource-ref id="ResourceRef_1123110667486">
    <description>
    </description>
    <res-ref-name>imssDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
   </resource-ref>
  </session>
The ibm-ejb-jar-ext.xmi files contains the following:
  <ejbExtensions xmi:type="ejbext:SessionExtension"
xmi:id="SessionExtension_1123174793374">
    <enterpriseBean xmi:type="ejb:Session"
href="META-INF/ejb-jar.xml#HistClinicaPP"/>
    <beanCache xmi:id="BeanCache_1123175678367" activateAt="ONCE"/>
    <internationalization xmi:id="BeanInternationalization_1123175807173"
invocationLocale="CALLER"/>
    <localTransaction xmi:id="LocalTransaction_1123174793374"
boundary="BeanMethod" resolver="Application" unresolvedAction="Rollback"/>
  </ejbExtensions>
I tried copying the configuration from WAS 4.0, the only piece of the 4.0.x
descriptor missing in the ext file is <structure>, since I couldn't find a
matching property in Rational Application Developer 6.0 for WAS 6.0. This is
what the ibm-ejb-jar-ext.xmi in WAS 4.0 contains for this bean:
  <ejbExtensions xmi:type="ejbext:SessionExtension"
xmi:id="SessionExtension_17" timeout="600">
    <enterpriseBean xmi:type="ejb:Session"
href="META-INF/ejb-jar.xml#Session_9"/>
    <structure xmi:id="BeanStructure_17" inheritenceRoot="false"/>
    <beanCache xmi:id="BeanCache_17" activateAt="ONCE"/>
    <internationalization xmi:id="BeanInternationalization_17"
invocationLocale="CALLER"/>
    <localTran xmi:id="LocalTran_17" boundary="BEAN_METHOD"
unresolvedAction="ROLLBACK"/>
  </ejbExtensions>
I am not an expert in EJBs, so I don't know how to correct this problem, any
help would be appreciated.

Thanks in advance,
Jorge Gomez