Expert Consultancy from Yellow Pelican

Troubleshooting JetException

A site about Talend

Troubleshooting JetException

A troublesome error that you may sometimes encounter is JetException. This error usually occurs when you try to execute your Job, and Talend is unable to convert your Job in to Java code.

Typically, you may see the following error message, when you attempt to execute your Job.

Execution failed : Failed to generate code. [org.eclipse.emf.codegen.jet.JETException: InvocationTargetException in Troubleshooting job]

Generally speaking, I would suggest that this is caused by an error in a Talend Component. It may be that there is a logical or syntactical error of your own making; however, Talend is not handling this in a graceful way.

Forcing a JetException error with tSalesforceGetUpdated

The tSalesforceGetUpdated component is a useful component, for demonstrating this issue. Simply drop one on to a new Job and then execute the Job.

tSalesforceGetUpdated expects to have an output connection. If you do not provide one, you will encounter the error shown above. It is interesting to note that this error does not manifest itself if you use the component tSalesforceGetDeleted, without an output connection; These two components are very closely related.

You will also notice that, if you click on the code tab, it is empty. If you're used to using the code tab, you will know that it usually takes a few seconds to display. In this instance, it displays immediately. It is not the case that it never displays any code, it is the case that it displays the code version as it was when you previously viewed the code - before the logic that causes the JetException error was introduced.

Troubleshooting JetException

Unless you can immediately see the logic or syntactical error that has introduced this exception, the first place to check for further information is the Talend Studio log file for the current workspace. This can be found at .../workspace/.metadata/.log.

Checking the last entry in the log file should provide useful information, as can seen from the extract shown below. This provides a clear indication that there is an issue with tSalesforceGetUpdated. The error suggests that there is a bug in the component - IndexOutOfBoundsException - however, we may also determine that it also requires an output connector.

!ENTRY org.talend.platform.logging 4 0 2013-09-03 18:07:49.394
!MESSAGE 2013-09-03 18:07:49,393 ERROR org.talend.designer.codegen.CodeGenerator  - InvocationTargetException

!STACK 0
org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
        at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:475)
        at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:447)
        at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:438)
...
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at org.talend.designer.codegen.translators.business.salesforce.TSalesforceGetUpdatedEndJava.generate(TSalesforceGetUpdatedEndJava.java:45)
        ... 52 more




Expert Consultancy from Yellow Pelican
comments powered by Disqus

© www.TalendByExample.com