Skip to main content

How to prevent errors in code generation caused by the 65535 bytes limit

In Talend Studio, some Jobs may fail in code compilation with an error of the 65535 bytes limit. This article explains the causes of this error and offers troubleshooting ideas and solutions.

For example, if a subJob has too many components or if there are too many columns in the schema, the Talend Job may fail to compile, and produce the following exception:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The code of method tFileInputDelimited_1Process(Map) is exceeding the 65535 bytes limit

This is because Talend Studio is a code generator and creates Java code for each Talend Job. Each subJob is a method in the Job class. If a subJob is too big, the size of the final generated code will exceed 65536 bytes. According to Java specifications, the amount of code for this non-native and non-abstract method is limited to a size of 65536 bytes, so the generated code of a subJob cannot be greater than this limit.

You can try to prevent this error by adding the following parameter to the config.ini file located in the configuration folder under the Talend Studio installation directory:

deactivate_extended_component_log=true

Note that once this option is set, your Job dependencies will be updated. If you are using Continuous Integration, it is advisable that you re-generate all the POMs in the project. To do so, go to Project Settings, expand the Build > Maven nodes, and click Force full re-synchronize poms.

If the issue cannot be resolved by adding the above parameter, as a workaround, you can try the following to optimize the Job and reduce the size of the final generated code of a subJob:

  • Minimize the number of components in the subJob, especially debugging components such as tLogRow.
  • Divide the subJob into several subJobs.

You can also try to prevent this error by disabling Log4j loggers in Talend Studio. For more information, see Activating and configuring Log4j.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!