Failed to generate code. error while trying to build jobs from Talend

Hi,
I am using TOS v5.4.2 (TOS_DI-Win32-r117442-V5.4.2). I have defined a java project with jobs . While trying to compile job i am getting below error.
I am unable to trace issue .
I am not able to compile any of the job.
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)
org.talend.designer.runprocess.ProcessorException: Failed to generate code.
at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:399)
at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:330)
at org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:566)
at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:707)
at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:987)
at org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.generateJobFiles(JobScriptsManager.java:643)
at org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.generateJobFiles(JobScriptsManager.java:633)
at org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobJavaScriptsManager.getExportResources(JobJavaScriptsManager.java:696)
at org.talend.repository.ui.wizards.exportjob.action.JobExportAction.exportJobScript(JobExportAction.java:187)
at org.talend.repository.ui.wizards.exportjob.action.JobExportAction.run(JobExportAction.java:117)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
at org.talend.repository.ui.wizards.exportjob.JobScriptsExportWizardPage.finish(JobScriptsExportWizardPage.java:1356)
at org.talend.repository.ui.wizards.exportjob.JavaJobScriptsExportWSWizardPage.finish(JavaJobScriptsExportWSWizardPage.java:1614)
at org.talend.repository.ui.wizards.exportjob.JobScriptsExportWizard.performFinish(JobScriptsExportWizard.java:124)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
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.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.talend.repository.ui.actions.ExportJobScriptAction.doRun(ExportJobScriptAction.java:117)
at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:608)
at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:93)
at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:237)
at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3212)
at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:1979)
at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:617)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
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:146)
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: ----------
1. ERROR in D:\Projects\Winyard\TOS_DI-Win32-r117442-V5.4.2\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\logs_errors\TWarnMainJava.java (at line 19)
public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
----------
2. ERROR in D:\Projects\Winyard\TOS_DI-Win32-r117442-V5.4.2\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\logs_errors\TWarnMainJava.java (at line 45)
stringBuffer.append(TEXT_1);
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
----------
2 problems (2 errors)
at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:905)
at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:666)
at org.talend.designer.codegen.CodeGenerator.generateComponentsCode(CodeGenerator.java:605)
at org.talend.designer.codegen.CodeGenerator.generateProcessCode(CodeGenerator.java:326)
at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:373)
... 60 more
5 REPLIES
Moderator

Re: Failed to generate code. error while trying to build jobs from Talend

Hi,
What's your JDK and OS?
Could you please take a look at document TalendHelpCenter:Compatible Platforms to see if you are on a compatible platform?

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.
One Star

Re: Failed to generate code. error while trying to build jobs from Talend

Open the code window and it should tell you where the error is. Probably a quote missing somewhere.
Moderator

Re: Failed to generate code. error while trying to build jobs from Talend

Hi mahesh.birajdar,
Any update for your issue?
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.
One Star

Re: Failed to generate code. error while trying to build jobs from Talend

Hi
I m using centos 6 and jdk 1.7 version .
i also getting same error
Moderator

Re: Failed to generate code. error while trying to build jobs from Talend

Hi ch.nithin,

Could you please  re-installed your Talend studio in a different folder without importing any project just create a new work space to see if it is OK with you?

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.