[resolved] Talend: The code of method exceeding the 65535 bytes limit...

One Star

[resolved] Talend: The code of method exceeding the 65535 bytes limit...

I am loading data from Salesforce to SQL. I've done it for few objects successfully. I am getting a problem while loading data from one object. The source object has over 500 columns. I am just dumping the data from source to target after some data type conversion. Initially, I auto mapped all the columns and it failed. I thought of mapping only few columns but still it is giving me the same error. However, I've not modified schema to include just 10 columns that I was using.
I am getting compilation error-The code of method is exceeding the 65535 limit.
I've checked other similar posts but I don't know what exactly I should do. It is java limitation but how I can solve it in talend. Please let me know what I should do with this Talend job.
Thanks,
Jayesh.

Accepted Solutions
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

The only way to shorten the names are if you have a tMap and shorten the names from the source schema. Keep in mind reading from a database does not depends on the correct schema names, only the position and the type is important.
But I guess, if you cannot solve the situation be removing the tMap my suggestion will probably not solve the problem.
What about reading a bunch of columns. Actually from the perspective of an business model it could hardly be the case an object has that huge amount of attributes. I am pretty sure you can model more than one business object.
You would need to read the datasets multiple times because you will not get everything at once and you should think about more the one output table - because of the mentioned split of the object into multiple objects.

All Replies
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

I am not sure but is it true you need only few columns from your input source?
In this case I would put the tMap at first to cut up all not needed columns.
Otherwise I would suggest to avoid type conversion in this first step. You could do this in a second step (reading the first table - I would call it reading staging table and transforming the data into a core table.
Moderator

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Hi,
It is known issue in talend.
Please refer to related jira bug https://jira.talendforge.org/browse/TDI-22059, https://jira.talendforge.org/browse/TDI-4569, https://jira.talendforge.org/browse/TDI-22933. We are working on the error "The code of method is exceeding the 65535 limit." for a huge of columns.
It suggest you can open a jira issue of DI project for work item issue jira portal. Our component developer will check your issue and give a workaround on your case

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: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Hi,
I am using TOS-ID 5.5 and I am experiencing the same error for the component tMSSQLInput. The exact error message is: The code of method tMSSqlInput_1Process(Map<String,Object>) is exceeding the 65535 bytes limit .
This process was working fine prior to my last changes; the MS SQL component reads an SQL server table which is a 1:1 copy of my target table on an AS400. This worked fine in general, but I had some truncations (causing to loose some records) and therefore decided to connect a tLogRow component to the tAS400Output component to catch the rejected records. But the job did not compile any longer. I removed the tLogRow, but it didn't change anything.
Prior to this action, I changed the schema on my AS400 component; I had found out that my Character fields where not assigned to a DBType. "Retrieve Schema" on the Schema Dialog solved this problem.
The 2 tables have 228 columns.
Any ideas how to overcome this problem ?
Regards
Heiko
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

It is known issue in talend

it's more like a java (jvm) constraint I think Smiley Happy
regards
laurent
One Star

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

To narrow the problem, I have created a new job, using the MS SQL Server input for the file which causes the error and an output to the AS400.
It works fine.
So it must be in the environment; any idea ?
The original job reads an Excel file prior to this steps, sets context variables and global maps from that input, executes "contextLoad" and then should run the upload to the AS400.
/Heiko
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

it's only due to generated code that cannot exceed 65535 bytes.
## 4.10 Limitations of the Java Virtual Machine
* The amount of code per non-native, non-abstract method is limited to 65536 bytes ....

cf : http://docs.oracle.com/javase/specs/#88659
have a look at Talend generated code for the job (method) that exceed jvm bytes limit Smiley Wink
hope it help
regards
laurent
One Star

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Hi,
It is known issue in talend.
Please refer to related jira bug , , . We are working on the error "The code of method is exceeding the 65535 limit." for a huge of columns.
It suggest you can open a jira issue of DI project for work item issue jira portal. Our component developer will check your issue and give a workaround on your case

Best regards
Sabrina


Hi,
I'm now having same problem trying to export a 500-column table from SQL Server using tMSSQLInput. Is there a workaround - I do need the table exported with all columns. The tickets you listed seem to be resolved, albeit mention a different component. Is this the same issue that was discussed here or something else? If yes - was it supposed to be fixed for all components or only ones listed in jira tickets?
Full error is as follows:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
     The code of method tMSSqlInput_1Process(Map<String,Object>) is exceeding the 65535 bytes limit
     at .tMSSqlInput_1Process(.java:14697)
     at .runJobInTOS(.java:30898)
     at .main(.java:30755)
Appreciate your help
Alex
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Please note the problem is always a too complex subjob. A subjob is the area which has the same background rectangle. A job it self can have a lot of subjobs.
I have made a job which processes 1500 columns and it works well. The number of columns alone is not the problem. You should take care you do not to much in your subjob. 
Could you provide a screenshot of your job?
One Star

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Unfortunately, I cannot - we are in a completely disconnected environment. But the job only consists three things:
1. tMSSqlInput - with a SELECT column1, column2, ..., column500 FROM table
2. tMap - which simply maps columns in the select 1:1
3. tVerticaOutput - which supposedly would insert the data
All 3 share the same background and are connected by Row-Main
Hope it makes sense
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

I guess you need the tMap because of different data types or slightly different names.
I am not sure but could you please check if your shorten the column names you could solve this issue.
I strongly suggest doing this in the exported xml format of the schema and not with the schema editor it self - this would take ages!
One Star

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Ah, I didn't even realize that I don't need a tMap... Thanks much for pointing this out.
I've taken it out, but the error is still occurring.
Sorry, I am not clear on this: Is your suggestion to shorten the column names in the source table or the target table?
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

The only way to shorten the names are if you have a tMap and shorten the names from the source schema. Keep in mind reading from a database does not depends on the correct schema names, only the position and the type is important.
But I guess, if you cannot solve the situation be removing the tMap my suggestion will probably not solve the problem.
What about reading a bunch of columns. Actually from the perspective of an business model it could hardly be the case an object has that huge amount of attributes. I am pretty sure you can model more than one business object.
You would need to read the datasets multiple times because you will not get everything at once and you should think about more the one output table - because of the mentioned split of the object into multiple objects.
One Star

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

I am confused: so is it the length of column names (which would be the length of the select statement) or the number of columns in the statement?
Seventeen Stars

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Both, but the number of columns have much more influence to the code size than the identifier names.
I am pretty sure if you use 2 x 250 columns in 2 different subjobs it will work.
One Star

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

Okay, got it - thank you. Will try to give it another go today!
One Star

Re: [resolved] Talend: The code of method exceeding the 65535 bytes limit...

still didn't work, although the error is different this time - thanks for helping me get through this one!