tMap with 2 tSalesforceInput Components: "Failed to Generate Code" Err

Six Stars

tMap with 2 tSalesforceInput Components: "Failed to Generate Code" Err

Hello...
I've been banging my head against the wall for two days on this.  I had a very nice flow working, closed my job and when I open it again I get a "Failed to Generate Code" error. 
I've spent some time and got it to the most basic elements for trouleshooting:
--Input from an .xlsx file to a tMap out to an .xlsx file. 
--Two tSalesforceInput components provide lookup tables to the tMap input (see image below). 
If I setup the components and flow, close my job, and open it back up, click on the "Code" tab no code is generated and the below exceptions are being logged. 

If I delete the link from the tSalesforceInputs to the tMap, close my job, open it, code is now generated.  So it seems there is something awry with the tSalesforceInputs.  What am I doing wrong?  Why did this work fine, then break after I closed my job and reopened it??
Talend Open Studio for Data Integration Version: 6.2.0
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)
Java HotSpot(TM) Client VM (build 25.91-b15, mixed mode, sharing)


-----------------------------------------------------------------------------
2016-05-29 15:55:40,107 ERROR org.talend.commons.exception.CommonExceptionHandler  - Failed to generate code.
org.talend.designer.runprocess.ProcessorException: Failed to generate code.
    at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:576)
    at org.talend.designer.runprocess.maven.MavenJavaProcessor.generateCode(MavenJavaProcessor.java:68)
    at org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:643)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:832)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:677)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1318)
    at org.talend.designer.core.ui.AbstractMultiPageTalendEditor.codeSync(AbstractMultiPageTalendEditor.java:1397)
    at org.talend.designer.core.ui.AbstractMultiPageTalendEditor.pageChange(AbstractMultiPageTalendEditor.java:701)
    at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:294)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:782)
    at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3110)
    at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1794)
    at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:283)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.talend.rcp.intro.Application.start(Application.java:197)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: org.talend.designer.codegen.exception.CodeGeneratorException: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException in One job
    at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:776)
    at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:556)
    at org.talend.designer.codegen.CodeGenerator.generatesTreeCode(CodeGenerator.java:691)
    at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:557)
    at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:502)
    at org.talend.designer.codegen.CodeGenerator.generateProcessCode(CodeGenerator.java:225)
    at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:573)
    ... 44 more
Caused by: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:469)
    at org.talend.designer.codegen.config.TalendJetEmitter.generate(TalendJetEmitter.java:684)
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:441)
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:432)
    at org.talend.designer.codegen.proxy.JetProxy.generate(JetProxy.java:54)
    at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:766)
    ... 50 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:461)
    ... 55 more
Caused by: java.lang.NullPointerException
    at org.talend.designer.codegen.translators.processing.TMapMainJava.generate(TMapMainJava.java:1239)
    ... 60 more

----------------------------------------------------------------------
2016-05-29 15:55:40,091 ERROR org.talend.designer.codegen.CodeGenerator  - InvocationTargetException
org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:469)
    at org.talend.designer.codegen.config.TalendJetEmitter.generate(TalendJetEmitter.java:684)
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:441)
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:432)
    at org.talend.designer.codegen.proxy.JetProxy.generate(JetProxy.java:54)
    at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:766)
    at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:556)
    at org.talend.designer.codegen.CodeGenerator.generatesTreeCode(CodeGenerator.java:691)
    at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:557)
    at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:502)
    at org.talend.designer.codegen.CodeGenerator.generateProcessCode(CodeGenerator.java:225)
    at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:573)
    at org.talend.designer.runprocess.maven.MavenJavaProcessor.generateCode(MavenJavaProcessor.java:68)
    at org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:643)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:832)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:677)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1318)
    at org.talend.designer.core.ui.AbstractMultiPageTalendEditor.codeSync(AbstractMultiPageTalendEditor.java:1397)
    at org.talend.designer.core.ui.AbstractMultiPageTalendEditor.pageChange(AbstractMultiPageTalendEditor.java:701)
    at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:294)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:782)
    at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3110)
    at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1794)
    at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:283)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.talend.rcp.intro.Application.start(Application.java:197)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
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:461)
    ... 55 more
Caused by: java.lang.NullPointerException
    at org.talend.designer.codegen.translators.processing.TMapMainJava.generate(TMapMainJava.java:1239)
    ... 60 more
Six Stars

Re: tMap with 2 tSalesforceInput Components: "Failed to Generate Code" Err

Something I've noticed:
Drag the connector from tSalesforceInput to tMap.  Save. Note the connector name "row2(Lookup, Main)".  At this point I can click on the code tab and code is generated.  I can open the tMap to see the settings.
Before


Close the job, then reopen the job:
Note that there is now a Warning: "This component has too much "Row" type inputs." message on the tSalesforceInput.  The connector name has changed to "row2(Lookup)" and I am unable to generate code.  I am also unable to access the tMap settings. (Unhandled event loop exception) .




---------------------------------------------------------------------------
Opening tMap:
Unhandled event loop exception

java.lang.NullPointerException
    at org.talend.core.model.components.IODataComponent.<init>(IODataComponent.java:54)
    at org.talend.designer.core.model.components.ExternalUtilities.getExternalNodeReadyToOpen(ExternalUtilities.java:45)
    at org.talend.designer.core.ui.editor.nodes.NodePart.performRequest(NodePart.java:553)
    at org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:194)
    at org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:137)
    at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:1069)
    at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:527)
    at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:231)
    at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:291)
    at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:518)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:196)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.talend.rcp.intro.Application.start(Application.java:197)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Employee

Re: tMap with 2 tSalesforceInput Components: "Failed to Generate Code" Err

If still possible can you share the job that causes the error?
Thomas Steinborn
VP Product Management
Employee

Re: tMap with 2 tSalesforceInput Components: "Failed to Generate Code" Err

We reproduced the issue and tracking it now at https://jira.talendforge.org/browse/TDI-36372
Thomas
Thomas Steinborn
VP Product Management
Six Stars

Re: tMap with 2 tSalesforceInput Components: "Failed to Generate Code" Err

Thank you!

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch