Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Jimmy Kennedy

Greenhorn
+ Follow
since Oct 28, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jimmy Kennedy

I am not using distributed transactions.Well my problem is solved.
http://publib7b.boulder.ibm.com/wasinfo1/en/info/aes/ae/rjta_useltran.html
I am using local transactions .I set transaction attribute of onMessage() method as NotSupported and add foloowing entries in ibm-ejb-jar-ext.xmi
<structure xmi:id="BeanStructure_1" inheritenceRoot="false"/>
<localTransaction xmi:id="LocalTransaction_1" resolver="ContainerAtBoundary" unresolvedAction="Rollback"/>
as I read from the link above.
20 years ago
Hi,
I have an MDB that is listening JMS Messages.I set the transcation attribute of MDB onMessage() method in the deployment desriptor "Required".
It is giving me this error in the SystemOut.log file.
[12/10/03 14:12:48:392 CST] 66d20958 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "onMessage" on bean "BeanId(QEL#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)
20 years ago
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)
20 years ago
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 ).
20 years ago
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 ?
20 years ago
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.
20 years ago
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
20 years ago
Just to correct I am connecting Websphere 5.0 with Oracle 9i ,and I am getting this error.
20 years ago
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
20 years ago
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
20 years ago
Hi Yash,Use File System Context for JNDI Lookup.In that case you will not be bind with Websphere bunch of jar files.
20 years ago
Hi,
I have a written an MDB which listens on WebSphere MQ Queue Connection Factory .In ejb-jar.xml ,I set trans-attribute for onMessage method to be Not Supported.
In MDB ,onMessage() I have written this code
try{
if(msg instanceof TextMessage){
String msgText = ((TextMessage)msg).getText();
// this code basically reads input text and in turn make a database call and get some data.
EQLParser objparser = EQLParser.getInstance();
boolean flag = objparser.log(msgText);
if(!flag){
log.info("Due to certain errors ,msg failed to log ");
}
}}catch(Exception e){
System.out.println("DEBUG MDB Exception ::::"+e.getMessage());
}

It works fine ,as the requirment but after onMessage method ,Container throws an exception as shown below:
[11/2/03 19:26:55:935 EST] 1950eab2 LocalTransact E J2CA0024E: Method rollback, within transaction branch ID <null> of resource pool jdbc/oracleDSN, caught com.ibm.ws.exception.WsException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: Use explicit XA call.
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:904)
at com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl.rollback(WSRdbSpiLocalTransactionImpl.java:297)
at com.ibm.ejs.j2c.LocalTransactionWrapper.rollback(LocalTransactionWrapper.java:307)
at com.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImpl.java(Compiled Code))
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:534)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:144)
at com.ibm.ejs.csi.NotSupported.postInvoke(NotSupported.java:91)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java(Compiled Code))
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code))
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:101)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:120)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
---- Begin backtrace for nested exception
java.sql.SQLException: Use explicit XA call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:219)
at oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:500)
at com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl.rollback(WSRdbSpiLocalTransactionImpl.java:280)
at com.ibm.ejs.j2c.LocalTransactionWrapper.rollback(LocalTransactionWrapper.java:307)
at com.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImpl.java(Compiled Code))
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:534)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:144)
at com.ibm.ejs.csi.NotSupported.postInvoke(NotSupported.java:91)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java(Compiled Code))
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code))
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:101)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:120)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
and threw a XAException.
Anyone knows what it exactly means...and how to solve this problem..
20 years ago
I am working on common component which will be used for logging messages and in turn publish messages to Websphere Topic via Log 4j JMS Appender.So my component will be put as in a classpath and everyone will call one of its method say
ClassA.log("Log message") and which in turn publish messages on the Topic (Websphere app. 5.0).
My question is ,using launchClient I am able to run my application client which publishes messages on topic.But how to I publish message without using launchClient coz I will be adding my code as a jar file in classpath.
I read about thin client and J2EE client in Websphere Info center.But Thin client says about installing thin client software that comes with Websphere CD on client m/c. whats that ???
20 years ago