fileOutputExcel problem.

One Star

fileOutputExcel problem.

TOS 6.1.1
I don't seem to be able to export data to an excel file any more. This is from a job that used to work fine but now isn't any more. I have checked disk space and that's not an issue. It happens with all excel file outputs - there are 5 in the job and they ALL have to be turned off or the job won't run to completion.
Exception in component tFileOutputExcel_2
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
 at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:89)
 at org.talend.ExcelTool.prepareXlsxFile(ExcelTool.java:110)
 at financemigration.someJobName_0_8.someJobName.tStatCatcher_1Process(someJobName.java:42167)
 at financemigration.someJobName_0_8.someJobName.tMSSqlConnection_1Process(someJobName.java:6686)
 at financemigration.someJobName_0_8.someJobName.tOracleConnection_1Process(someJobName.java:6952)
 at financemigration.someJobName_0_8.someJobName.tPrejob_1Process(someJobName.java:41733)
 at financemigration.someJobName_0_8.someJobName.runJobInTOS(someJobName.java:43022)
 at financemigration.someJobName_0_8.someJobName.main(someJobName.java:42525)
Exception in component tFileOutputExcel_2
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
 at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:89)
 at org.talend.ExcelTool.prepareXlsxFile(ExcelTool.java:110)
 at financemigration.someJobName_0_8.someJobName.tStatCatcher_1Process(someJobName.java:42167)
 at financemigration.someJobName_0_8.someJobName.runJobInTOS(someJobName.java:43034)
 at financemigration.someJobName_0_8.someJobName.main(someJobName.java:42525)
Exception in component tFileOutputExcel_2
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
 at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:89)
 at org.talend.ExcelTool.prepareXlsxFile(ExcelTool.java:110)
 at financemigration.someJobName_0_8.someJobName.tStatCatcher_1Process(someJobName.java:42167)
 at financemigration.someJobName_0_8.someJobName.tFileInputExcel_2Process(someJobName.java:4820)
 at financemigration.someJobName_0_8.someJobName.tOracleInput_1Process(someJobName.java:19656)
 at financemigration.someJobName_0_8.someJobName.runJobInTOS(someJobName.java:43043)
 at financemigration.someJobName_0_8.someJobName.main(someJobName.java:42525)
Exception in component tHashInput_21
java.lang.RuntimeException: The hash is not initialized : The hash must exist before you read from it
 at financemigration.someJobName_0_8.someJobName.tHashInput_21Process(someJobName.java:5822)
 at financemigration.someJobName_0_8.someJobName.tOracleInput_5Process(someJobName.java:36055)
 at financemigration.someJobName_0_8.someJobName.runJobInTOS(someJobName.java:43055)
 at financemigration.someJobName_0_8.someJobName.main(someJobName.java:42525)
Exception in component tFileOutputExcel_2
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
 at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:89)
 at org.talend.ExcelTool.prepareXlsxFile(ExcelTool.java:110)
 at financemigration.someJobName_0_8.someJobName.tStatCatcher_1Process(someJobName.java:42167)
 at financemigration.someJobName_0_8.someJobName.tChronometerStop_1Process(someJobName.java:4318)
 at financemigration.someJobName_0_8.someJobName.tPostjob_1Process(someJobName.java:41631)
 at financemigration.someJobName_0_8.someJobName.runJobInTOS(someJobName.java:43070)
 at financemigration.someJobName_0_8.someJobName.main(someJobName.java:42525)
Exception in component tFileOutputExcel_2
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
 at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:89)
 at org.talend.ExcelTool.prepareXlsxFile(ExcelTool.java:110)
 at financemigration.someJobName_0_8.someJobName.tStatCatcher_1Process(someJobName.java:42167)
 at financemigration.someJobName_0_8.someJobName.runJobInTOS(someJobName.java:43097)
 at financemigration.someJobName_0_8.someJobName.main(someJobName.java:42525)

I previously had a problem that seemed to be caused by corrupted files in the .java directory, which I solved with some help (https://www.talendforge.org/forum/viewtopic.php?pid=188004#p188004) so this might be a residual problem related to something else being corrupted in the workspace perhaps...? 
Moderator

Re: fileOutputExcel problem.

Hi,
Have you tried to recreate a new job to see if it works? What does your  job design look like?
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: fileOutputExcel problem.

I had a quite similar issue (same error message, impossible to run the job). After investigating, it looks like the excel file was corrupted after being badly closed on the last run of the job that did not finished properly. I had to delete the file and then it solved my isse.
Not sure it was the same issue as above, but I had the same error message.