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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tLogCatcher does not catch Java Exception

Hi,
I have a job which does some work, and calls some subjobs. This main work is connected by a flow and has one start point (highlighted as green).
I want every Java exception been kept by tLogCatcher.
I created a tLogCather job as standalone job (not within the main flow). One sub job follows the tLogCatcher. The sub job shall make some entries in my databases log-table. The tLogCatcher is also highlighted as green and "catch Java Exceptions" is checked, tDie and tWarn isnt checked.
I found this Thread which unfortunately stays unsolved. There one told about a checkbox for multithreading. I do not have such an option for tLogCatcher.
Well when executing my job the console shows an Java exception. I do not understand why my log job isnt called.
One thought, I was not able to find an answer on is if I need to create a tlogCather on every subjob or if its enough to have one on the main job.
For further imagination here are some Screenshots about my job and the options of tLogCatcher.
Any help would be grateful. Thanks in advance.

Labels (3)
27 Replies
Anonymous
Not applicable
Author

Hi Kaspatoo,
I created a tLogCather job as standalone job (not within the main flow). One sub job follows the tLogCatcher. The sub job shall make some entries in my databases log-table. The tLogCatcher is also highlighted as green and "catch Java Exceptions" is checked, tDie and tWarn isnt checked.

Your screenshots of job design will be preferred. Did you connect your tLogCatcher component to t<DB>output component to save java exception log?(tLogrow-->t<DB>ouput) ? What's the subjob which makes some entries in your databases log-table?
Here are Stat&log option in project setting ( it  is working on the whole project (Parent job and child jobs, and output them on file/DB but no context setting).
 and Stat&log in job view is working on the current job (you should set Stat&log of job view in both parent job and child jobs and output them on file/DB with context setting).
Best regards
Sabrina

0683p000009MAUm.png 0683p000009MAKv.png
Anonymous
Not applicable
Author

hm well my screenshots are missing now, yesterday they were shown in my post
heres my next try, else i am going to load them externally:
Anonymous
Not applicable
Author

Hi Kaspatoo,
 I need to create a tlogCather on every subjob >>
As you are thinking, it is not possible to catch logs and errors by a subjob for parent job... You need to have logcatcher component for every job...
If you want to avoid repeat target location, what you can do is, use tlogcatcher in every job and redirect all the records to single subjob which will insert data into the target location.
Vaibhav
Anonymous
Not applicable
Author

fileupload wont work
here are the external images:
Anonymous
Not applicable
Author

well hes not even showing the links
thats stupid....
I try links with a broken URL, so delete spaces within them please, im sorry for that
htt p://w ww. file-upload.net/download-9301676/main_job.PNG.html
htt p://w ww. file-upload.net/download-9301673/option_advanced.PNG.html
htt p://w ww. file-upload.net/download-9301674/option_base.PNG.html
htt p://w ww. file-upload.net/download-9301677/option_documentation.PNG.html
htt p://w ww. file-upload.net/download-9301678/option_dynamic.PNG.html
htt p://w ww. file-upload.net/download-9301679/option_view.PNG.html
Anonymous
Not applicable
Author

@xdshi: documentation only says that with "stats & logs" i would be able to monitor logs.
So I now do not know what it really does? when using "use logs (tLogCatche)" will it then catch all exceptions as I want?
Does any tLogcatcher only work when the checkbox "use logs (tLogCatche)" in "stats & logs" is checked?
Whats the difference using a tLogCatcher and not havin checked "use logs (tLogCatche)" and having it checked?
and yes my tLogCatcher is connected to a DBout but via subjob. The exceptions says "premature end of file" on VALIDATE XML (which is running in main job and not any subjob). So the error does not occur after tLogcatcher caught it if you were one the way to imply this.
@sanvaibhav: well thanks, could explain it, but my colleage who programmed it in past is sure about havin tested it catching exceptions from subjobs. Well I am going to have a test on it.
Anonymous
Not applicable
Author

Hi,
tLogcatcher fetches set fields and messages from Java Exception, tDie and/or tWarn and passes them on to the next component.
Does any tLogcatcher only work when the checkbox "use logs (tLogCatche)" in "stats & logs" is checked?

You can use component(tLogcatcher) to catch java exception separately. If you use Stat&log option in project setting or Stat&log in job view, you have to check out "use logs (tLogCatche)" to enable it.
and yes my tLogCatcher is connected to a DBout but via subjob. The exceptions says "premature end of file" on VALIDATE XML (which is running in main job and not any subjob). So the error does not occur after tLogcatcher caught it if you were one the way to imply this.

Is there any java exception info printed on console?
We cannot see your external images you provided. Can you use "upload" or "Drop files here to attachement" to upload them? What's the error your are facing?
See my pics
Best regards
Sabrina


0683p000009MAUr.png
Anonymous
Not applicable
Author

Hi, 
If you use Stat&log option in project setting or Stat&log in job view, you have to check out "use logs (tLogCatche)" to enable it.

Yeah fine but what does it do? Catch now all Java exceptions in all jobs and subjobs? And what then? does it write the Exceptiontext or trace? Am I able to instead write a message like "an error occured"?
Errortext on console is in red letters:
"Error on line 1 of document  : Premature end of file. Nested exception: Premature end of file."
did you delete the blanks in the URL?
This is my failure description for inserting images:
Forum - Problem
Hi,
on a forumpost

I was not able to insert screenhots.
The postfield offered me to interactiv fields to drag&drop files or copy&paste images.
I tried using drag and drop png-files of size about 50kb. It did not work while giving me a failmessage that the uploaded file would not meet requirements.
Clicking a png file from my desktop, clicking + <C> to copy it, then click in forum post area on the interactive field "dopy&paste screenshots" and then click +

to paste it will upload the image and show a thumbnail under my post-text. All looking fine. When click on post my post is posted but without any screenshot.
When now clicking in toolbar above the next answer-area on "upload" it will show me my screenshots but I cannot successfully drag them to my post area.
Due to this I tried to insert URLs of my png files now externally uploaded but the post is postet without the URLs.
I now did it with posting broken URLs (I inserted some blanks).
A Talend team member asked me to post screenshots. Well its not that easy.
You may should remove the new-user-blocks.
Thanks.

Anonymous
Not applicable
Author

Hi,
Yeah fine but what does it do? Catch now all Java exceptions in all jobs and subjobs? And what then? does it write the Exceptiontext or trace? Am I able to instead write a message like "an error occured"?

Stat&log in project setting ( it  is working on the whole project (Parent job and child jobs, and output them on file/DB but no context setting).
Stat&log in job view is working on the current job (you should set Stat&log of job view in both parent job and child jobs and output them on file/DB with context setting).
You can choose to write the Exceptiontext into file or Database.
Am I able to instead write a message like "an error occured"?

You cannot do it when using Stat&log in job view or Stat&log in project setting.
You are able to achieve it by using tLogcatcher component(tLogcatcher-->tMap-->tfileoutputxxx). In tMap editor, you can replace exception message or keep both.
To make it clear, I have designed a simple demo job.
1: Using Stat&log in job view
2: Using tLogcatcher component(tLogcatcher-->tMap-->tfileoutputxxx) to replace exception message.
For 3 ways, Stat&log in project setting, Stat&log in job view or tLogcatcher, use either of them.
See my pics
Best regards
Sabrina
0683p000009MAUi.png 0683p000009MAUE.png 0683p000009MAFT.png 0683p000009MAV1.png