the code of the method is exceeding the 65535 bytes limit

Four Stars

the code of the method is exceeding the 65535 bytes limit

I read few other articles regarding the error message above, looks like it is a limitation in Java. I wanted to get thoughts on how to split my job or if there are any alternatives for this problem.
I am working with a schema of 100 columns and we have lot of rules. So far we only added five rules and we get the above error. 
I am attaching the job along for reference, and we are using paid version of talend big data.
Would using dynamic schemas help with this issue ? some other thread was mentioning that this issue is fixed in 5.6 is that true ?
Thanks for all the help in advance.
One Star

Re: the code of the method is exceeding the 65535 bytes limit

adding image again.

In case the image is not visible my job looks like below.
tmongodbInput---> filter1 _----> filter2 ---->..............--->filter3----> tmongodboutput

Re: the code of the method is exceeding the 65535 bytes limit


Thank you for your post! We can't see the screenshot on our side. Could you attach it on the forum, please? That would be great.

For "the code of the method is exceeding the 65535 bytes limit" error, it's probably caused by your large number columns which generated code that exceed 65535 bytes.
Please see:

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

Re: the code of the method is exceeding the 65535 bytes limit

Unfortunately, your job isn't visible, but I can make some guesses about how the job is structured.  Please let me know if I'm on track!
The limitation comes from the Java class file specification and isn't specifically related to any Talend component -- although they are related, since the generated code must respect the limitation.  It usually occurs with jobs with large schemas, and the workaround is to manually force the job into several distinct steps.
I tested with a tMongoDBInput with 250 String columns, followed by 12 tFilterRows, followed by a tMongoDBOutput and the generated method is larger than the 64kB limit in Java in Talend v5.4 and v5.6.
If you need all of the columns during your filters, one workaround for breaking the job into smaller steps is to write an intermediary file to disk (after N filters) and trigger an OnSubJobOK to resume processing at the N+1'th filter.  If the dataset is small enough, you can use a tHashOutput/tHashInput pair to collect the results in memory (but this is only appropriate when the intermediary step is guaranteed to fit in memory, which depends on your filters, of course).
There's another workaround that focuses on reducing the number of columns that need to be passed around, but that depends on the input structure of your data (is it a JSON document at a single level, or with more structure?) and whether only a few columns are actually used in the filters.  Is this the case with your job?
It looks like the tMongoDBInput doesn't support the Dynamic type, unfortunately.
If the workaround doesn't suit your use case, I encourage you to file a bug with the specific details of your requirements.
All my best, Ryan


Join us at the Community Lounge.

Register Now


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences


Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now