Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Catching Exceptions thrown by Talend in java try catch.

HI , I have a talend Job. I am calling this Talend Job from some custom java classes in my web project .
I want to catch exceptions thrown by talend to be catched in my java classes. So that I can sense the Success / Failure of my Talend Job inside the java class.
Any kind of help is appreciated.
Thanks, 
Labels (3)
4 Replies
Anonymous
Not applicable
Author

Hi,
If you want to capture the exception and handle error. here is a component called tLogCatcher can be used to capture exception and log them(console, file or db table )
Or you can enter personalized code in TalendHelpCenter:tJavaFlex to catch exception in work flow.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
I have created a dummy job and build it. It will give me a zip file. Now I need to extract the zip. I will get a few jar files. Now In my web application, there will be a java call which will call the Talend job. Then I can create a Logger to log the exception in the log file.
0683p000009MDeW.jpg
In this screenshot, I have called a talend job. nb_line context variable in my job is of integer type. I am passing a dirty data as input. So, job will fail. I have captured the exception in the catch block.
If we want, we can capture the exception in a log file as well. 
Thanks,
Alok
Anonymous
Not applicable
Author

Hi,
Do you want to save run console output in a log file? I mean do you want to output the full stack trace to a file?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
To check success or failure of the job , we can use talendJob.getStatus() method in the screenshot. This will give status of the job execution. This value is Success/failure. Then we have no need to focus on log file.
Thanks,
Alok