From Thursday, July, 9, 3:00 PM Pacific,
our Community site will be in
read-only mode
through Sunday, July 12th.
Thank you for your patience.

Failed to generate code: Exception on Header_additionalJava

Highlighted
Four Stars

Failed to generate code: Exception on Header_additionalJava

Hi,

 

I'm new to talend and was trying to run a simple job to read data from a CSV file. However, when i try running the job it gives out the below error as some exception on Header_additionaljava file due to write permissions:

Error_img1.pngError_img2.png

 

I'm using Talend version 7.1

JDK 1.8

Can someone please help me out with this error.

Highlighted
Moderator

Re: Failed to generate code: Exception on Header_additionalJava

Hello,

We need more information to address your issue.  Is this issue specific to a job and the error occurred due to a single component? Any misconfiguration/invalid setup of the component?  Does this issue repro on all your jobs?

Many thanks for your time.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Four Stars

Re: Failed to generate code: Exception on Header_additionalJava

Hi,

I have a very similar problem, after upgrading from TOS 7.0.1 to 7.1.1

If I run the job from a Linux Centos 7 jdk 1.8 machine gives me an error, the tab code is empty.

If I go to launch the same job from a Windows 10 jdk 1.8 machine the job runs correctly. 

 

[talend@ETL ~]$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
[talend@ETL ~]$ echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java
[talend@ETL ~]$

On my .log I have

 

!ENTRY org.talend.platform.logging 4 0 2019-05-08 11:01:42.396
!MESSAGE 2019-05-08 11:01:42,394 ERROR org.talend.commons.exception.CommonExceptionHandler  - Impossibile generare il codice.

!STACK 0
org.talend.designer.runprocess.ProcessorException: Impossibile generare il codice.
	at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:624)
	at org.talend.designer.runprocess.maven.MavenJavaProcessor.generateCode(MavenJavaProcessor.java:82)
	at org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:876)
	at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1124)
	at org.talend.designer.runprocess.ProcessorUtilities.generateNodeInfo(ProcessorUtilities.java:1457)
	at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:560)
	at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1861)
	at org.talend.designer.runprocess.RunProcessContext$1.run(RunProcessContext.java:601)
	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:548)
	at org.talend.designer.runprocess.ui.ProcessComposite.exec(ProcessComposite.java:1401)
	at org.talend.designer.runprocess.ui.views.ProcessView$RunAction.run(ProcessView.java:701)
	at org.talend.designer.runprocess.ui.actions.RunProcessAction.run(RunProcessAction.java:58)
	at org.talend.designer.core.debug.JobLaunchConfigurationDelegate$1.run(JobLaunchConfigurationDelegate.java:84)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3774)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3412)
	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:265)
	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)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: org.talend.designer.codegen.exception.CodeGeneratorException: org.eclipse.emf.codegen.jet.JETException: Exception on  Header_additionalJava
	at org.talend.designer.codegen.CodeGenerator.instantiateJetProxy(CodeGenerator.java:476)
	at org.talend.designer.codegen.CodeGenerator.generateTypedComponentCode(CodeGenerator.java:464)
	at org.talend.designer.codegen.CodeGenerator.generateTypedComponentCode(CodeGenerator.java:421)
	at org.talend.designer.codegen.CodeGenerator.generateTypedComponentCode(CodeGenerator.java:407)
	at org.talend.designer.codegen.CodeGenerator.generateProcessCode(CodeGenerator.java:223)
	at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:621)
	... 43 more
Caused by: org.eclipse.emf.codegen.jet.JETException: Exception on  Header_additionalJava
	at org.talend.designer.codegen.config.TalendJetEmitter$TalendEclipseHelper.initialize(TalendJetEmitter.java:386)
	at org.talend.designer.codegen.config.TalendJetEmitter.initialize(TalendJetEmitter.java:151)
	at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:453)
	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.instantiateJetProxy(CodeGenerator.java:473)
	... 48 more
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file system: '/.JETEmitters/src/org/talend/designer/codegen/translators/common/Header_additionalJava.java'.
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:793)
	at org.eclipse.core.internal.resources.File.getContents(File.java:290)
	at org.eclipse.core.internal.resources.File.getContents(File.java:279)
	at org.talend.designer.codegen.config.TalendJetEmitter$TalendEclipseHelper.initialize(TalendJetEmitter.java:311)
	... 55 more

Ask for more information.

 

Thanks

Highlighted
Moderator

Re: Failed to generate code: Exception on Header_additionalJava

Hello @feedrss81 

Are you using recommended OpenJDK distribution: Zulu?

Here is online installation guide about:TalendHelpCenter:Compatible Operating Systems for V 7.1.1

Best regards

Sabrina

 

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Four Stars

Re: Failed to generate code: Exception on Header_additionalJava

Initially the Oracle8 version was installed.

I tried to install the Zulu_8 version as recommended, but the problem remains the same.

I also added XULRunner on the .ini file. But nothing.

What can I check or change?

 

[talend@ETL ~]$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (Zulu 8.38.0.13-CA-linux64) (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (Zulu 8.38.0.13-CA-linux64) (build 25.212-b04, mixed mode)
[talend@ETL ~]$ echo $JAVA_HOME
/usr/lib/jvm/zulu-8

 

Thanks a lot

Highlighted
Four Stars

Re: Failed to generate code: Exception on Header_additionalJava

Hi @xdshi,

any suggestions?

Thanks!

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog