Search code examples
javajava-8talend

Talend Execution Fails to Generate Code


I'm trying to build the first example job from talend (http://www.talendforge.org/tutorials/tutorial.php?language=english&idTuto=1#Action)

When I attempt to run it, I get the following errors:

Execution failed : Failed to generate code. [----------
1. ERROR in C:\Talend\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\technical\TSortOutBeginJava.java (at line 1)   package org.talend.designer.codegen.translators.technical;  ^ The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
----------
2. ERROR in C:\Talend\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\technical\TSortOutBeginJava.java (at line 421)     stringBuffer.append(TEXT_1);    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
---------- 2 problems (2 errors)]

I've tried changing window>preferences>talend>java interpreter to point to the jdk installation as well as the jre7 and jre8 installations, all to no avail.

Additionally, I've tried executing sample jobs provided by talend's big data demo and received the same error messages


Solution

  • Talend doesn't currently support Java 8. This is as of 5.4 although I'd have to check 5.5 but I believe that is still the case and I think likely to be the case for 5.6 too.

    You shouldn't have to uninstall any 1.8.x JDKs, just make sure that your JAVA_HOME and Path system environment variables are pointing to a 1.7.x JDK (and that this 1.7.x JDK is first in the list).