One Star

How to caught or print all type exception and errors?

Hi,
I am trying to print all kind of exception,warning, or error but still could not find the reason. Warnings or exceptions are shown in talend compiling section like:- one of SOAP element has thrown an exception unwinding now
org.apache.cxf.interceptor.Fault.
Still could not find the reason behind this error. Also I want to send job's errors or exceptions to consumer as response. I used tlogCatcher and tAssertCatcher , these two with tlogrow but they did not print anything. But in talend compiling section I can see "exception unwinding now"- this exception. How can I catch these exception. Any idea is appreciable. Thanking you,
Regards,
Sanjay
8 REPLIES
Moderator

Re: How to caught or print all type exception and errors?

Hi,
Did you use ESB routes or service?
If you are using routes, you can use clog and cOnException to catch exception.
For ESB service, you can print it on console :such as;Talend-Studio-win32-x86.exe -consoleLog >log on cmd (warning and error)

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: How to caught or print all type exception and errors?

Hi Sabrina,

If I want to print in Talend , then what I have to do? I am using tlogcatcher and tAssertCatcher but these did not print that error.
Which component print any kind of error or exception?- or can send error message to the Consumer using my tesbprovider response? Thanking you,
Regards,
Sanjay
Moderator

Re: How to caught or print all type exception and errors?

Hi,
tlogcatcher fetches set fields and messages from Java Exception, tDie and/or tWarn and passes them on to the next component but not service fault.
If you want to get a fault message of the Web service
Please take look at the component reference tESBProviderFault
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: How to caught or print all type exception and errors?

Hi,
Thanks for your quick reply. But How can I display the error messages when I ran the job in talend by F6. I want to display the error message as I want. Like:- it's given NullPointerException in one java component in run console but I want to show it like:- System.out.println("Error Occured"+((String)globalMap.get("tJava_1_ERROR_MESSAGE")));
-Is it possible?
Thanks once again.
Regards,
Sanjay
Moderator

Re: How to caught or print all type exception and errors?

Hi,
If it is java exception(NullPointerException), it can be caught by tlogcatcher (Did you check out the die on error option).
See my screenshot
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: How to caught or print all type exception and errors?

One Star

Re: How to caught or print all type exception and errors?

Hi Sabrina,
I got your point. Yes I was not checked the Die on error cause I can not stop the execution in the middle of job. I have already told you anything happen to my service that should go back to consumer service. I could not send only Soap Fault occurred to consumer. I have to send a perfect message.

Anyway thanks a lot. I will find out the proper way. Thanking you,
Best regards,
Sanjay
One Star

Re: How to caught or print all type exception and errors?

Hi rogierlommers,

Your post help me lot. I am searching this tRedirectOutput component. thanking you,
Regards
Sanjay