Talend Basics: Common Errors and Troubleshooting

by | Aug 23, 2016 | BlogPosts, Talend, Tech Tips | 0 comments

When building and testing talend jobs there are a number of errors that come up time and time again. For anyone experienced with Talend, these errors are easy to interpret and fix. However, they can be more frustrating for a beginner. Here are some basic troubleshooting tips for people who are still getting to grips with Talend.

“Type Mismatch: Cannot convert from…”

This error will occur during compilation rather than runtime. Below is an example of what you might see when trying to run your job.

2016-08 Talend Basics Common Errors - Image 1

The best way to find out where in your code this is happening is to click the code tab underneath the canvas and look for a red block on the right of the window. As you can see from the below image, the error is taking place in tmap_1 between row1 and out1.

2016-08 Talend Basics Common Errors - Image 2

You can then see the problem area has been underlined in red, to see the specific error you can hover over the error-icon on the left (as shown in the above image).

… cannot be resolved to a variable”

This error will occur during compilation rather than runtime. Below is an example of what you might see when trying to run your job.

2016-08 Talend Basics Common Errors - Image 3

This error can occur when a component/link/variable has been added/renamed in a job, but said change has not been updated throughout the job. Use the same method outlined above, using the code window to track down the issue.

“Null Pointer Exception”

The first two examples have been compilation errors and are pretty straightforward to resolve in most cases. A null pointer exception, however, is a runtime error and depending on the size and complexity of your code can be more difficult to pin point. The below example is a straightforward example of how to track down the issue.

Here’s an example of a null pointer error in the Talend log window.

Exception in component tMap_1
[FATAL]: sandbox.simplejob_o_1.simpleJob - tMap_1 null
java.lang.NullPointerException
at sandbox.simplejob_0_1.simpleJob.tFileInputDelimited_1Process(simpleJob.java:1698)
at sandbox.simplejob_0_1.simpleJob.runJobInTOS(simpleJob.java:2848)
at sandbox.simplejob_0_1.simpleJob.main(simpleJob.java:2682)

This error normally means that somewhere in your code you are trying to perform an operation of some description on a variable with a null value. The above error tells you the component where the exception occurred (although this is not always 100% accurate) but to find the exact line of code where the error happened you need to go to the code window again.

For troubleshooting this error (and any run time error) you can go to the code window and do a ctrl + l on the lines of java given in the error log, starting from the top and working down until you find something sensible. Below is a screenshot showing the result of a ctrl + l on line 1698 (given on the 4th line of the above error message). This shows that the job errors on the “State” field in tMap_1.

2016-08 Talend Basics Common Errors - Image 4

Happy Troubleshooting

I hope you have found this article useful, please feel free to comment at the bottom of the page or use the contact us tab if you want to get in touch. Alternatively, to receive a monthly notification of this month’s blog posts, subscribe to our blog. Thanks!

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *