• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connecting Websphere 5.0 to Oracle 8.1.7

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I am trying to connect Websphere 5.0 with Oracle .I am using oracle JDBC XA Driver .Its giving me connection.But giving an exception
One or more resources rolled back. An unresolved LocalTransactionContainment had an unresolved action of rollback.

What wrong I did , anyone knows..
Jimmy
 
Jimmy Kennedy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to correct I am connecting Websphere 5.0 with Oracle 9i ,and I am getting this error.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I take it this is happening in an EJB? Can you give us more details about what you are doing when this is happening (can you give code?)
Kyle
 
Jimmy Kennedy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I am using MDB to listen messages .In OnMessage method of MDB ,I am reading JMS message ,then get Database Connection (Oracle9i) using WAS database pool .It gives me connection and works fine and come out of onMessage() method of the MDB .But in log file I am getting this error.
jdbc/oracleDSN is the name of my Datasource .
In Websphere 5.0 , in resources I created a JDBC Provider using oracle JDBC XA Driver.
[12/9/03 10:33:05:749 CST] 7b8ba08e LocalTransact E WLTC0033E: Resource jdbc/oracleDSN rolled back in cleanup of unresolved LocalTransactionContainment.
[12/9/03 10:33:05:834 CST] 7b8ba08e LocalTransact E WLTC0032E: One or more resources rolled back. An unresolved LocalTransactionContainment had an unresolved action of rollback.
[12/9/03 10:33:06:627 CST] 7b8ba08e ServerSession W WMSG0031E: Exception processing JMS Message for MDB EQLMDB, JMSDestination jms/qelQueue : javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
com.ibm.ws.exception.WsEJBException
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:159)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2976)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExceptionMappingStrategy.java:96)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:165)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2976)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
What wrong I am doing.
Regards
Jimmy
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This happens when (a) You don't define Container Managed Transactions for your MDB and (b) You set the default action on local transactions to be rollback.
You can read in the Infocenter for more information on Local Transactions, but my recommendation to you is simply to use Container Managed Transactions. Set your MDB to have a transaction attribute of REQUIRES_NEW.
Kyle
 
Jimmy Kennedy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using CMP only and transaction attribute "Not Supported".Just now I changed it to be "REQUIRES_NEW",it is giving me same error.
 
Jimmy Kennedy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
If I give any other transaction attribute to my MDB , its giving an error
com.ibm.ejs.jms.listener.MDBException: Invalid MDB onMessage() transaction attribute
And Requires_NEW is not a valid transaction attribute for MDB.
https://coderanch.com/t/157592/java-EJB-SCBCD/certification/Mock-exam-questions-MDB

So I am back to the transaction attribute NotSupported.and its giving me same error.I am not inserting anything to DB ,I am retrieving a data from table and writing it into the log file thats it .What do I do ?
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mea Culpa -- I knew I should have checked the spec to figure out the exact setting (of course, you could have done the same thing ). As per section 17.4.1 of the EJB specification, set the transaction attribute of the MDB's onMessage() method to be REQUIRED.
By the way, this really isn't an error (although it looks like one). I discuss this in great and gory detail in my WebSphere book in the transactions chapter, but what is happening is that when you have the transaction set to NOT_SUPPORTED, you are in what the spec refers to as a "Undefined transaction context". Therefore, it's up to the container do guess what you want to do. The default guess is that any unresolved transactions should be rolled back...
Kyle
[ December 09, 2003: Message edited by: Kyle Brown ]
 
Jimmy Kennedy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok If I set the transaction attribute of my MDB to be Required, do I have to run any scripts on the database side to enable transaction .I am using Oracle 9i and JDBC Oracle Driver (XA ).
 
Jimmy Kennedy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok If I set the transaction attribute of my MDB to be Required, do I have to run any scripts on the database side to enable transaction .I am using Oracle 9i and Orcale JDBC Driver (XA ).
Because its giving me this error:
[12/9/03 17:05:58:315 CST] 32668c5e ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "onMessage" on bean "BeanId(qel-1_0_0_jar#qel-1.0.0.jar#EQLMDB, null)". Exception data: java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: oracle.jdbc.xa.OracleXAException: method getXAErrorMessage(I)Ljava/lang/String; not found
at com.ibm.websphere.rsadapter.OracleDataStoreHelper.getXAExceptionContents(OracleDataStoreHelper.java:733)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.traceXAException(WSRdbXaResourceImpl.java:871)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.start(WSRdbXaResourceImpl.java:827)
at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1405)
at com.ibm.ejs.jts.jta.WSResourceImplBase.start(WSResourceImplBase.java:164)
at com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:730)
at com.ibm.ejs.jts.jta.JTSXA.enlist(JTSXA.java:998)
at com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:740)
at com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:743)
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processInteractionPendingEvent(WSRdbManagedConnectionImpl.java:1299)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.beginTransactionIfNecessary(WSJdbcConnection.java:328)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.createStatement(WSJdbcConnection.java:697)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.createStatement(WSJdbcConnection.java:673)
at com.sbc.eql.dao.EQLDAO.getErrorDetail(EQLDAO.java:39)
at com.sbc.eql.util.EQLParser.log(EQLParser.java:99)
at com.sbc.eql.ejb.EQLMDBBean.onMessage(EQLMDBBean.java:49)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:205)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:194)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:172)
at com.ibm.mq.jms.MQSession.run(MQSession.java(Compiled Code))
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:922)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:697)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:482)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:449)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic