Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

pnbalaji
2012-03-23 17:43:19

I found it. I had to uncheck the "Catch tDie" checkbox for the tlogCatcher component.

However, with out this, it appears to be a bug in talend.

Thanks,
Balaji.

pnbalaji
2012-03-23 17:38:39

Thanks for your response.

More than customizing the message, I am interested in "ABORTING" the job.

Thanks,
Balaji.

janhess
2012-03-23 17:30:52

You can pass an on error condition to a tDie and customise the message.

pnbalaji
2012-03-23 17:28:53

Ok. I figured it out. The job is as below.

tFileInputFullRow      ==> tSampleRow       ==> tJavaRow

tSampleRow has the range as "1..1" and tJavaRow has the code below.

if (!("01".equals(input_row.line.substring(0,2))))
{
    throw new Exception("\n File is not for production Aborting..");
}

The job has a tlogRow and tDie component. The job is throwing the exception and tlogCatcher is catching. But the job is not aborting.

The job seems to be running in an infinite loop and I see the output below.


Starting job test at 11:19 23/03/2012.

[statistics] connecting to socket on port 4023
Exception in component tJavaRow_2
java.lang.Exception:
File is not for production Aborting..
    at omsleodev.test_0_1.test.tFileInputFullRow_1Process(test.java:690)
    at omsleodev.test_0_1.test.runJobInTOS(test.java:1426)
    at omsleodev.test_0_1.test.main(test.java:1294)
[statistics] connected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
.
.
.
.
.
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
Exception in thread "main" java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error:
.
.
.
.
.
.
java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.StackOverflowError
Job test ended at 11:19 23/03/2012. [exit code=0]


I had to manually kill the job.

How do I make the job to abort automatically in case of the exception? Setting the "Exit JVM immediately" in the tDie component is not working in this case.

Thanks,
Balaji.

pnbalaji
2012-03-23 15:10:21

No other replies on this post? I am still waiting for some one to help..

Thanks,
Balaji.

pnbalaji
2012-03-22 03:46:13

Thanks for your response.

There is no parent-child job concept here. This is just a single job and I need to abort the job based on different error conditions.

Thanks,
Balaji.

nicolasdiogo
2012-03-21 13:27:32

if you have a parent job calling this job you mentioned

you could raise the error
and in your parent job you can check your error output value and DO something.

does it help?

Nicolas

pnbalaji
2012-03-21 13:06:37

Hi,

I have a job which reads an input file and updates the fields in salesforce object. The job is working fine and I would like to add some error handling conditions. The following two requirements are mandatory.

If the input file is not available, the job should abort with the error message "Input File not found. Aborting..".
If the input file is available, then the first two characters in the first record (batch header record) must be "01". If it is not "01", the job should abort with the error message "Input file not set for the division Corporate Sales".

I know I can use tlogCatcher and tDie, but not sure how to handle these two cases. I may have to add more error condition later.

Can some one help me?

Thanks,
Balaji.

Board footer

Powered by FluxBB