Job using tDataMasking and Snowflake components won't build

Symptoms

If you are using the tDataMasking component along with the Snowfake component in a Talend 6.4.1 Job, when you try to run the Job, you may see an error saying that the Job won't run. You may have checked all your settings and connection info, and you have verified that they are correct and can connect. This issue may appear regardless of whether you try to build the Job on a local Studio instance or on a remote CommandLine instance.

 

Diagnosis

If you have checked the logs, you may find this or another similar error:

 

!ENTRY org.talend.platform.logging 4 0 
!MESSAGE  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:572)
	at org.talend.designer.runprocess.maven.MavenJavaProcessor.generateCode(MavenJavaProcessor.java:71)
	at org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:685)
	at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:511)
	at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1413)
	at org.talend.designer.runprocess.RunProcessContext$1.run(RunProcessContext.java:576)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:527)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:284)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1190)
	at org.talend.designer.runprocess.RunProcessContext.exec(RunProcessContext.java:531)
	at org.talend.designer.runprocess.remote.RunRemoteProcessContext.exec(RunRemoteProcessContext.java:71)
	at org.talend.designer.runprocess.debug.ui.DebugProcessComposite.exec(DebugProcessComposite.java:1993)
	at org.talend.designer.runprocess.debug.ui.DebugProcessComposite.addInHistoryRunningList(DebugProcessComposite.java:617)
	at org.talend.designer.runprocess.debug.ui.DebugProcessComposite.execButtonPressed(DebugProcessComposite.java:607)
	at org.talend.designer.runprocess.debug.ui.DebugProcessComposite$1.widgetSelected(DebugProcessComposite.java:300)
	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.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:255)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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 TestJob1 job
	at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:765)
	at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:510)
	at org.talend.designer.codegen.CodeGenerator.generatesTreeCode(CodeGenerator.java:680)
	at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:517)
	at org.talend.designer.codegen.CodeGenerator.generatesTreeCode(CodeGenerator.java:680)
	at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:521)
	at org.talend.designer.codegen.CodeGenerator.generatesTreeCode(CodeGenerator.java:680)
	at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:537)
	at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:482)
	at org.talend.designer.codegen.CodeGenerator.generateProcessCode(CodeGenerator.java:226)
	at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:569)
	... 43 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:755)
	... 53 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:461)
	... 58 more
Caused by: java.lang.NullPointerException
	at org.talend.designer.codegen.translators.data_quality.TDataMaskingBeginJava.generate(TDataMaskingBeginJava.java:164)
	... 63 more

 

Solution and Workaround

There is a workaround for this particular issue:

 

Add a tJavaRow component between your tFileInputDelimited and tDataMasking component. This will allow the Job to pass the encrypted data to the tDataMapper and Snowflake component from your preloaded data without losing your schema.

tDataMasking workaround.png

 

If you are on 6.4.1, and cannot use the workaround for whatever reason, a patch has been created for 6.4.1 that automatically fixes the issue and does not require any additional user changes. If you would like this patch, please reach out to Talend Support and request patch TPS-2108.

 

Installing the patch

For instructions on installing the patch, see Apply a patch to Talend Studio/CommandLine in the Talend Help Center.

 

Original Issue: TDQ-14231

TPS-2108 Patch for 6.4.1: TPS-2108

Version history
Revision #:
7 of 7
Last update:
‎10-23-2017 01:31 PM
Updated by:
 
Contributors