ProcessorException: Failed to generate code

One Star

ProcessorException: Failed to generate code

I am using TOS v2.3.1 (TOS-All-r11699-V2.3.1). I have defined a java project with two jobs and all worked fine until the TOS started to complain with the following message box:
An error has occured(Failed to generate code.).
See log for more details.
(A fragment of the log file that contains the exception stack trace is pasted below)
The last thing I changed in the project was a minor one (change a property of a tOracleOutput component).
I've tried to close the TOS, to switch the project but without any result.
When I change the job view from 'Designe' to 'Code' I don't see any syntax error reported in the java code.
I am able to run the jobs (after the error message box), but it seems as they run using the old code (my last change on a tOracleOutput is not taken into account).
Should I somehow 'clean' the code? Any other hint what to try?

The log file fragment:
!ENTRY org.talend.libraries 4 0 2008-03-04 13:50:44.071
!MESSAGE 2008-03-04 13:50:44,055 ERROR org.talend.commons.exception.ExceptionHandler - Failed to generate code.
!STACK 0
org.talend.designer.runprocess.ProcessorException: Failed to generate code.
at org.talend.designer.runprocess.java.JavaProcessor.generateCode(Unknown Source)
at org.talend.designer.core.ui.AbstractMultiPageTalendEditor.codeSync(Unknown Source)
at org.talend.designer.core.ui.AbstractMultiPageTalendEditor.doSave(Unknown Source)
at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:143)
at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper.java:266)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2451)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:274)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:253)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:148)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1345)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3184)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3197)
at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:73)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:475)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:429)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:165)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:821)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:879)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:568)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:126)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1141)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1285)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3772)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3672)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4351)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2264)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3291)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.talend.rcp.intro.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Caused by: org.talend.designer.codegen.exception.CodeGeneratorException: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
at org.talend.designer.codegen.CodeGenerator.generateComponentCode(Unknown Source)
at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(Unknown Source)
at org.talend.designer.codegen.CodeGenerator.generateProcessCode(Unknown Source)
... 64 more
Caused by: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:463)
at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:435)
at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:426)
at org.talend.designer.codegen.proxy.JetProxy.generate(Unknown Source)
... 67 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor11.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:455)
... 70 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.talend.designer.codegen.translators.file.input.TFileInputDelimitedBeginJava.generate(TFileInputDelimitedBeginJava.java:495)
... 74 more
Community Manager

Re: ProcessorException: Failed to generate code

Hi
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.talend.designer.codegen.translators.file.input.TFileInputDelimitedBeginJava.generate(TFileInputDelimitedBeginJava.java:495)
... 74 more

I think you have used the schema from metadata on tFileInputDelimited or tOracleOutput component. The schema in metadata have been changed.(am I right?)
So, you try to define the schema in Built-In type and run the job.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: ProcessorException: Failed to generate code

You were right. I did change the schema in the repository. The problem remained until I changed the schema property of components manually (change to 'built-in' and than change it back).
Thanks for your answer.
Bye,
Nikola