Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to retrieve exception error details and error line no and store in database. In tLogCatcher, I only saw exception error name such as java.lang.NumberFormatException:null. How to retrieve error line no and their details?
The following is tLogCatcher details. Where to get error line number and details?
Hello,
Could you please show us your whole job design screenshot? Let us know if you add "Die on Error" check box in your input source so that you will get error while reading the file itself.
Best regards
Sabrina
I ticked "Die on Error" check box and I got error details in terminal. The thing is I want to store that error details in database. TLogCatcher is not storing that error details. Any way to get these error details?
Hello JaRoi,
if you use a tLogCatcher component in your job, you need to connect its row output (if applicable via another tMap) to a database output component in order to write its data to a database table.
However, you can do without a tLogCatcher component by going to the "Stats & Logs" panel in the Job view and activating the "Use logs (tLogCatcher)" setting and enabling the "On databases" configuration. Make sure to check the "Catch runtime errors" settings (and others, if needed).
Best regards,
Thomas
Hello JaRoi,
for logging your data, you could try this:
From your tXMLMap, create a new output to a tHashOutput component and let your job write some important parts for your data to this "temporary log".
From your tLogCatcher component, create an "onComponentOk" link to a tHashInput component. Read from the previously created tHashOutput and write that data to a tLogRow (or a file). That way you should be able to capture your input data up to the point when an error occurs.
Best regards,
Thomas
It only show these error details. Any way to get error line number which error is causing?
Hello JaRoi,
you asked
> Any way to get error line number which error is causing?
Are you talking about the line number of the job java code or the line number of the input data flow?
You could add a sequence to the output (and input) of the tHash... components I mentioned.
Best regards,
Thomas
Hi Thomas,
I am talking about the line number of java code which error is causing. How to use thash components? I want to retrieve error stack trace occurred in txmlmap component.
Hi JaRoi,
perhaps this might help.
In tMap, on the left (input) side, open the tMap configuration/properties window and disable the "Die on error" setting. Then you will find an ErrorReject panel on the output side of the tMap. Connect that to a tLogRow or a file.
tMap Properties
Best regards,
Thomas