Support for nested exceptions is provided in java.lang.Throwable, the base class for Exception, in turn the base class for all exceptions; you can query the nested cause of the exception by using the method getCause(). Regrettably, if the App Server doesn't marshall the exception when throwing the Remote Exception, you're left with no means of determining it but on the code generating the Remote Exception upwards.
HTH, Juan Pablo Lorandi Chief Software Architect Code Foundry Ltd. [EMAIL PROTECTED] Barberstown, Straffan, Co. Kildare, Ireland. Tel: +353-1-6012050 Fax: +353-1-6012051 Mobile: +353-86-2157900 www.codefoundry.com > -----Original Message----- > From: A mailing list for Enterprise JavaBeans development > [mailto:[EMAIL PROTECTED]] On Behalf Of Serkan Oktar > Sent: Saturday, December 14, 2002 9:18 AM > To: [EMAIL PROTECTED] > Subject: extract root cause of an remote Exception in CMP > > > Hi, > I am trying to maintain an application which is designed with > CMP. At the moment I should get information about database > status during run-time, and I had a problem. > > How can I extract root cause of an remote Exception in CMP? > > I need to know the root cause of an exception ( especially > DB2Exception ). As a trial I dropped one of mapped tables and > run a sample method. (in VAGE > 4.0) > When the trace level of server (Visual Age 4.0 Test > Environment ) is set to medium, in trace log I can see what I want. > COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] > SQL0204N "ADMINISTRATOR.CLIENT" is an undefined name. SQLSTATE=42704 > > But message body of thrown exception does'nt contain this > information . You can see Message body of ex. below. > > I am wondering, is it possible to get information about > SQL,DB2Exceptions in CMP? If so, how? > > regards, > Serkan > > ex.getMessage() = > CORBA TRANSACTION_ROLLEDBACK 0 No; nested exception is: > org.omg.CORBA.TRANSACTION_ROLLEDBACK: > com.ibm.websphere.csi.CSITransactionRolledbackException > java.lang.Throwable() > java.lang.Exception() > java.io.IOException() > java.rmi.RemoteException() > com.ibm.websphere.csi.CSIException() > com.ibm.websphere.csi.CSITransactionRolledbackException() > void > com.ibm.ejs.csi.TranStrategy.handleException(com.ibm.websphere > .csi.EJBKey, > com.ibm.ejs.csi.TxCookieImpl, com.ibm.websphere.csi.ExceptionType) > void > com.ibm.ejs.csi.TransactionControlImpl.postInvoke(com.ibm.webs > phere.csi.EJBK > ey, com.ibm.websphere.csi.TxCookie, > com.ibm.websphere.csi.ExceptionType) > void > com.ibm.ejs.container.EJSContainer.postInvoke(com.ibm.ejs.cont > ainer.EJSWrapp > er, int, com.ibm.ejs.container.EJSDeployedSupport) > dg3.apps.ssb.Client dg3.apps.ssb.EJSRemoteAppealpart.getClient() > dg3.apps.ssb.Client dg3.apps.ssb._Appealpart_BaseStub.getClient() > dg3.apps.ssb.Client dg3.apps.ssb._Appealpart_Stub.getClient() > tablekeys.MyHashtable > dg3.apps.ssb.MainBean.find_Technical(java.lang.String, > java.lang.String, int, java.lang.String) > tablekeys.MyHashtable > dg3.apps.ssb.EJSRemoteMain.find_Technical(java.lang.String, > java.lang.String, int, java.lang.String) > org.omg.CORBA.portable.OutputStream > dg3.apps.ssb._EJSRemoteMain_Tie._invoke(java.lang.String, > org.omg.CORBA.portable.InputStream, > org.omg.CORBA.portable.ResponseHandler) > com.ibm.rmi.ServerResponse > com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(com.ibm.rmi > .ServerRequest > ) > com.ibm.rmi.ServerResponse > com.ibm.CORBA.iiop.ORB.process(com.ibm.rmi.ServerRequest) > void com.ibm.CORBA.iiop.WorkerThread.run() > void com.ibm.ejs.oa.pool.ThreadPool$PooledThread.run() > minor code: 0 completed: No > > ============================================================== > ============= > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the body of the message "signoff EJB-INTEREST". > For general help, send email to [EMAIL PROTECTED] and > include in the body of the message "help". > > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
