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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (3)
6 Replies
Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

Hi @rhall,

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.


Properties_of_Output_component.png
Anonymous
Not applicable
Author

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?

Anonymous
Not applicable
Author

Hi @rhall

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

Anonymous
Not applicable
Author

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)

 

 

 

BooWseR
Contributor
Contributor

I have a very similar problem, but in version 7.1.1 Talend OS ESB. In some situations, my job crashes due to an error within a subjob, but I always get exit code 0 back. I also have a lot of subjobs and don't want to use the tDie component anywhere. Is there any new information about this "bug" or is there a workaround in the meantime?

 

Here's my topic: https://community.talend.com/t5/Design-and-Development/Error-code-0-despite-NullPointerException/td-...