org.eclipse.emf.codegen.jet.JETException: InvocationTargetException er

Hello
I am getting this error
Execution failed : Failed to generate code.

using 5.2.2r99271
when I try to run a job.
This particular job has all inputs from delimited files.
I have tried restoring to previous versions of my project, I've reinstalled Talend but this problem seems to have just suddenly arrived and I can't get rid of it no matter what I do.
Now some of my jobs work - some simple input file to output file with a tSortRow work but not all. Most jobs don't work, and none with a tMap work.
I have checked the repository and this problem hasn't occurred as far as I can see for many years.
6 REPLIES
Seventeen Stars

Re: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException er

The problem here is, the JET code (the code which creates the final job java code for the job) throw an exception and therefore the final Java code is not build.
You have to try-and-error which component causes this problem by adding one by one.
Before you click on run please switch to the code view of the job and check if the code becomes visible (and take care, this view should need a second or more before the code is shown, if the code view shows it immediately - something is wrong and the visible code is probably from the last working version.

Re: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException er

Hello jlolling
Thank you very much for your speedy response to this problem.
I will try your suggestion although this will be a bit of a challenge for me.
Where is this jet code held? It seems strange that this problem occurs still when I download a new version of TOS-DI AND restore my project file from Monday (I didn't have any problems until last night so my back up I would have thought would be OK)?
Thus is there any knowledge of what would have corrupted something to have caused this problem?
What do I do when I find it, if I do? Do I have to update some code somewhere? (I have about 30 jobs, of which most apart from a couple don't run).
Kind regards
Peter
Seven Stars

Re: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException er

It sounds like this a job built in a previous version of Talend? Unfortunately, sometimes new versions of Talend contain bugs, which mean that jobs that previously ran fine just won't compile. If your job still works in the old studio then I'm afraid you'll have to submit a support ticket and wait for a fix.

Re: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException er

Thanks Alevy, Well, I've been using 5.2.2 for several weeks without any problems. But thanks. I think I may need to raise this with Talend as it is certainly a serious problem for me and when older backup files and new Talend installs still generates the problem that were working fine when the back up was originally taken seems to me like the problem is environmental but I have no idea.
Thanks again
peter
One Star

Re: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException er

Hello,
I've encountered the exact issue. However, prior to two weeks ago, the suite brought up the code, ran and was successful in generating a jar file. NOW I can't do anything (execution). It throws the following:

Execution failed : Failed to generate code.


Any help is appreciated.
Jimmie Richardson
BTW...... I am using the following:
Version: 5.3.1
Build id: r104014-20130618-0337
Additional information:
!ENTRY org.talend.platform.logging 4 0 2015-05-14 12:36:06.826
!MESSAGE 2015-05-14 12:36:06,825 ERROR org.talend.commons.exception.CommonExceptionHandler  - Failed to generate code.
!STACK 0
org.talend.designer.runprocess.ProcessorException: Failed to generate code.
 at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:405)
 at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:329)
 at org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:569)
 at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:406)
 at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1095)
 at org.talend.designer.runprocess.RunProcessContext$1.run(RunProcessContext.java:487)
 at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
 at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
 at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
 at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
 at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1162)
 at org.talend.designer.runprocess.RunProcessContext.exec(RunProcessContext.java:459)
 at org.talend.designer.runprocess.ui.DebugProcessTosComposite.exec(DebugProcessTosComposite.java:621)
 at org.talend.designer.runprocess.ui.DebugProcessTosComposite.addInHistoryRunningList(DebugProcessTosComposite.java:596)
 at org.talend.designer.runprocess.ui.DebugProcessTosComposite.execButtonPressed(DebugProcessTosComposite.java:571)
 at org.talend.designer.runprocess.ui.DebugProcessTosComposite$1.widgetSelected(DebugProcessTosComposite.java:272)
 at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
 at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
 at org.talend.rcp.intro.Application.start(Application.java:141)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Caused by: org.talend.designer.codegen.exception.CodeGeneratorException: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
 at org.talend.designer.codegen.CodeGenerator.instantiateJetProxy(CodeGenerator.java:552)
 at org.talend.designer.codegen.CodeGenerator.generateTypedComponentCode(CodeGenerator.java:540)
 at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:879)
 at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:615)
 at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:587)
 at org.talend.designer.codegen.CodeGenerator.generateProcessCode(CodeGenerator.java:325)
 at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:372)
 ... 40 more
Caused by: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
 at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:475)
 at org.talend.designer.codegen.config.TalendJetEmitter.generate(TalendJetEmitter.java:529)
 at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:447)
 at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:438)
 at org.talend.designer.codegen.proxy.JetProxy.generate(JetProxy.java:54)
 at org.talend.designer.codegen.CodeGenerator.instantiateJetProxy(CodeGenerator.java:549)
 ... 46 more
Caused by: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:467)
 ... 51 more
Caused by: java.lang.Error: Unresolved compilation problems:
 The method replace(char, char) in the type String is not applicable for the arguments (String, String)
 The method replace(char, char) in the type String is not applicable for the arguments (String, String)
 The method replace(char, char) in the type String is not applicable for the arguments (String, String)
 The method replace(char, char) in the type String is not applicable for the arguments (String, String)
 The method replace(char, char) in the type String is not applicable for the arguments (String, String)
 at org.talend.designer.codegen.translators.common.Component_part_footerJava.generate(Component_part_footerJava.java:354)
 ... 56 more
I have looked at each map and do not see where a varchar is moving to a string.
HELP!!!! PLEASE!!!
One Star

Re: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException er

After an exhaustive research, I found out what the REAL issue is/was. I had JAVA 8 pushed to my machine and was unaware of the update. Typically our installation informs us, but this did not occur.
I installed JAVA 6 and 7 and all works as expected.
Hope this helps out someone who has gone through or is going through this exercise with less pain then I experienced.
Jimmie Richardson
:-/