Four Stars

Job in Talend failing with exit_code=0

Hi All,

I've got into a weird issue while executing a job in Talend. Version I am using is:

Talend Open Studio for Data Integration 6.5.1

 

I was doing some error-handling, so I made a child job fail purposefully due to the error "Exception in component tPostgresqlOutput_3 (extract_material)
org.postgresql.util.PSQLException: ERROR: relation "rawstore.material" does not exist". Somehow, the exit_code is coming as 0 for it. 

I've checked the properties of the component "tPostgresqlOutput". I've already checked the "Die on error" checkbox. The problem here is that, my parent job is unable to comprehend the failure of the child job and passing the control to the next job which should not happen ideally, the next job execution is dependent on "OnSubJobOk".

Attaching screen-shots below. Any help would be appreciated here. 

 

Thanks in advance,

Mayank

5 REPLIES
Fifteen Stars

Re: Job in Talend failing with exit_code=0

Are you using a tPostJob component? If so, that is the cause. You need to recognise you have received an error during your main job and force an error (using a tDie) in your tPostJob section. 

 

If you are not using a tPostJob, you will need to give a bit more info about your job.

Rilhia Solutions
Four Stars

Re: Job in Talend failing with exit_code=0

Hi @rhall_2_0,

I am not using tPostJob component in the job. Also, I tried using tDie to handle the exit_codes and it works fine with it. The problem here is, I have around 20 jobs in total, and I'll have to apply tDie in all output components of all the jobs. This would make the jobs clumsy. 

I'm attaching the screen-shot of the tPostgresqlOutput component that is failing. Let me know if you need any specific info.

Fifteen Stars

Re: Job in Talend failing with exit_code=0

You shouldn't need to add a tDie. The only time I have had to do this is in the scenario where a tPostJob is involved. I raised this as a fault but it wasn't accepted as a bug. However, this does appear to be a bug. I can't recreate this in v6.2.1. @xdshi@shong is this a known bug?

Rilhia Solutions
Four Stars

Re: Job in Talend failing with exit_code=0

Hi @rhall_2_0

If this is a bug, do I need to point this out to some specific group? How would this be rectified?

Any alternative solution to get this through(apart from applying tDie component in all jobs)? If not, should I move to some previous versions of Talend?

I actually have to productionize my code asap, hence, waiting for this to be resolved soon.

Thanks,

Mayank

Fifteen Stars

Re: Job in Talend failing with exit_code=0

The things to try....

1) Reinstall your Studio. It *could* be an issue with your Studio install. I have tried using the tPostgresqlOutput and forcing an error (in that I do not have a db) and it always exits with 1.

2) Check out the Talend Jira to see if this issue exists (https://jira.talendforge.org)

3) Call support if you have a support contract

4) Try building the job in an older or newer version

5) Try compiling the job and see if it runs with the correct exit code once compiled

6) Use another method to raise the error (the tDie)

 

 

 

Rilhia Solutions