One Star

tMSSQLOutput "Die on error" option doesn't appear to work in joblet!

I have a joblet whose job it is to perform an update to a single SQL Server record with the key specified in a context variable (let's call it JobletUpdateKey). If there is any problem with the update (or any other joblet component), I want the joblet to immediately exit. In the job that calls the joblet, I have a tLogCatcher that I want to trap any exceptions (Java, tDie, tWarn) generated by the job or joblet.
Of course, I have "Die on error" set on the tMSSQLOutput, and I also have the appropriate tLogCatcher options selected (Catch Java exceptions, Catch tDie, Catch tWarn).
To test the error handling, I pass the joblet a JobletUpdateKey that doesn't match any key in the database. The joblet doesn't update that row of course, but it doesn't generate any exception and the parent job's tLogCatcher is never triggered.
I know it's rejecting the row correctly because, on the tMSSQLOutput, when I uncheck "Die on error" and "Use Batch Size," and then hook up a reject row, I can see that the row is being rejected. With these options checked, however, the joblet simply refuses to die!
The only thing I can think of is that joblets catch their own exceptions and don't rethrow them to the parent, but even then, I would expect the joblet to die and log an error.
I can upload job/joblet details if there isn't an obvious answer.
Thanks!
3 REPLIES
One Star

Re: tMSSQLOutput "Die on error" option doesn't appear to work in joblet!

Hi,
maybe you can try to plug your reject flow to a tdie component
put the reject error field as the message of the tdie
One Star

Re: tMSSQLOutput "Die on error" option doesn't appear to work in joblet!

I tried that and, believe it or not, it doesn't exit the joblet, even if I have "Exit JVM immediately" checked. Thanks for your input though.
One Star

Re: tMSSQLOutput "Die on error" option doesn't appear to work in joblet!

I trust you.
Open an incident on talend's bugtracker.