One Star

How to print runtime exception

Hi, all:
I use web service and sometimes it threw runtime exception like this:
Exception in component tWebServiceInput_1
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: javax.ejb.EJBTransactionRolledbackException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:javax.ejb.EJBTransactionRolledbackException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
I try to print those error to my log file but I don't know how. I try tStatCatcher and tFileOUtpurDelimited but only showed
moment;pid;job;context;origin;message_type;message;duration;timestamp;widgetOperId;scrapQty
2008-09-15 10:11:18;ligoTL;SLN_NM_Scrap;Default;;begin;;;Mon Sep 15 10:11:20 PDT 2008;51;99
2008-09-15 10:11:20;ligoTL;SLN_NM_Scrap;Default;;end;failure;1968;Mon Sep 15 10:11:20 PDT 2008;51;99
Please help me how to print runtime exception to log file.
Thanks,
Vincent
2 REPLIES
One Star

Re: How to print runtime exception

you can use a tJava, or tJavaRow (depending on which one works for your situation), with the following in the code to print it to the console
System.out.println(((String)globalMap.get("tWebServiceInput_1_ERROR_MESSAGE")));

also, make sure you have all the logging turned on to catch all errors and warnings (see pic)
and, it might work to attach a tLogRow component after your tWebServiceInput component, but I'm just not sure
One Star

Re: How to print runtime exception

Hi,
I have the same need. The solution above does not work.
Any other idee ?
Thanks