The Java Debug mode - 7.3

Debugging Talend Jobs

Version
7.3
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2024-02-13

In the example given in the previous section, you can also debug the Job by looking at the Java code that Talend Studio generates, so as to locate the error returned by Java (in this case, a null pointer exception). In this example, notice the line number (780) in the first line of the error message.
By opening the Code tab in Talend Studio and go to the line number causing the error (780), you can infer from the screenshot below that one of the fields – Amount1 or Amount2 – has null data. This is especially helpful when you have a lot of fields within a component, and you want to identify which of these fields is causing the null pointer exception.
Note: This debugging method assumes that you are familiar with Java programming.

To debug the Job in the Java Debug mode:

  1. With your Job open in Talend Studio, open the Run view and then select Debug Run.
  2. Click the Java Debug button. The Job runs and Talend Studio switches to the Debug view, where a Java code view is created in the workspace. The Java code view contains the Java code of the Job generated by Talend Studio.
    Note: Click the triangle in the right part of the button and select Java Debug if Java Debug does not appear on the button.
  3. Debug the Job in the Debug view. You can set breakpoints and inspect/watch the values of the fields passing through the data flow.