Using getNextException to see the cause of an exception

Overview

This article explains how to get the reason for an exception using debug mode and offers troubleshooting advice.

 

Symptoms

When you get an exception and need more information about the cause, you can use getNextException to see the cause of the exception.

 

Procedure

Talend Studio is a rich client platform (RCP) IDE based on Eclipse, you can use debug mode to trace the Java code.

  1. Open the Run view and click the Debug Run tab.

  2. Click the Java Debug button to launch the debug perspective.

    1_054.png

    If a Proceed with launch dialog appears, click the Proceed button to continue.


  3. Open the Breakpoints view and click the Add Java Exception Breakpoint button as shown:

    2.png


  4. Type "BatchUpdateException" in the Search bar. Select the "BatchUpdateException-java.sql" exception, then click OK.

    3_029.png


  5. Click Resume to restart Job execution.

    4_026.png

    The job will stop while the Java exception BatchUpdateException is thrown.


  6. Open the Variables view, right-click anywhere, then select Find .

    5_018.png


  7. Type "e" in the text field, then click OK. The e variable is predefined with the value "java.sql.BatchUpdateException" in the Talend Job.

    6_011.png


  8. Expand the e node, followed by next node, then detailMessage node. The detailed error message is displayed, as shown:

    7_008.png


Version History
Revision #:
6 of 6
Last update:
‎05-04-2017 11:23 PM
Updated by:
 
Labels (1)
Contributors
Tags (1)