Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a process that works great locally but breaks when I run it from the Execution server that is a Linux system.
The process breaks when I select the 'Write excel2007 file format(xlsx)' checkbox. I have verified the java version isn't the issue and encoding is set to the UTF-8 default on the server and in the component. Also, all Modules are installed required for the component and are not showing warning/errors. Here is the error I'm getting:
tFileOutputExcel_1 0
java.lang.ArrayIndexOutOfBoundsException: 0
I can write to the location when 'write excel2007' is not checked so it's not a permission or schema issue. I am using Talend 6.4. No issues utilizing dozens of other components in this project.
IMO - This is too common of a component to be an issue with Talend and has to be something with my install or setup of the Execution server. What should I try next?
Thanks,
James
Hello,
What does your input excel file look like? Is there any ghost character in it? Does this issue repro on all your excel files or a specific one?
Best regards
Sabrina
Hello Sabrina,
The original jobs all write to excel before sending to recipients, the issue has been with anything I publish and run from the job/execution server. To try and find a solution I created a simple job the generates one column with 100 rows using the TalendDataGenerator.getFirstName() function. I have attached a screen shot of the simple job. Again, I am able to create xls extension with the excel component but not 2007.
The OS on the job server is CentOS 7.
According to the stack trace, the method throwing the error is:
[FATAL]: integrations_2.write_file_using_tac_excel_0_14.write_file_using_tac_excel - tFileOutputExcel_1 0
java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:375)
Looking at the debug trace, the FONT parameter is empty:
[DEBUG]: integrations_2.write_file_using_tac_excel_0_14.write_file_using_tac_excel - tFileOutputExcel_1 - Parameters:VERSION_2007 = true | USESTREAM = false | FILENAME = "/tmp/test.xlsx" | SHEETNAME = "Data" | INCLUDEHEADER = true | APPEND_FILE = false | FIRST_CELL_Y_ABSOLUTE = false | FONT = | IS_ALL_AUTO_SZIE = false | AUTO_SZIE_SETTING = [{IS_AUTO_SIZE=false, SCHEMA_COLUMN=Name}, {IS_AUTO_SIZE=false, SCHEMA_COLUMN=newColumn}] | CREATE = true | FLUSHONROW = false | ADVANCED_SEPARATOR = false | ENCODING = "UTF-8" | DELETE_EMPTYFILE = true |
So, the sun.font.CompositeFont.getSlotFont method probably expects the FONT parameter to be defined before it is called. I don't have a copy of Talend available at the moment, but are there any parameters under the Advanced tab of the tFileOutputExcel component that might populate that parameter (I can't think of any, but worth a check)?
If not, I would consider raising this as a bug report with Talend; someone probably needs to look at the Java code that is generated, because my guess is that the FONT parameter is supposed to be populated by an internal method that the user has no direct control over. For some reason, that's not happening. Unfortunately, you probably won't have access to the internal methods to find the bug yourself, and even if you did, there's not much you can do other than exporting the code outside of Talend, fixing the error, then running it in a Java interpreter.
I hope this helps; if there's anything more I can do, please let me know.