This article explains the causes of this error and offers troubleshooting ideas and solutions.
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, non-abstract method is limited to a size of 65536 bytes, so the generated code of a subjob cannot be greater than this limit.
As a workaround, optimize the Job to reduce the size of the final generated code of a subjob. Try the following:
A job is made up of one or more subjobs. A subjob consists of one or more components. Below is a very simple job with only one subjob, and that subjob has only three components.
If this job were to generate a "65535 bytes limit"-type of error during the build/generate process, it would be an error with this job's only subjob. We would want to reduce the number components in that subjob.
So we start with a subjob with only three components:
Your error might look something like this:
At least job "HelloWorld" has a compile errors, please fix and export again. Error Line: 23424 Detail Message: The code of method tRowGenerator_1Process() is exceeding the 65535 bytes limit
The method name specified in the error message, tRowGenerator_1Process(), lets you know that the error is happening in the tRowGenerator_1 subjob - each subjob is named according to the first component that was used to start the subjob. So this particular error message tells you the problem is in the subjob that was started with the tRowGenerator_1 component. In this case, we only had one subjob in our job, so it had to be this subjob that was the problem, but you can have more than one subjob.
Break that subjob into two subjobs - one subjob with two components, and one with just one component:
Hopefully, making the problematic subjob smaller (by breaking it down into two separate subjobs) will resolve this issue.