Ok, I found the solution for this error. Accidentaly I tried to write the stream out twice. Between the first and the second try of writing I closed the OutputStream. So poi was trying to write to a closed outputstream. No wonder it did not work. Though the Exception was a bit misleading.
bye Bodo > -----Urspr�ngliche Nachricht----- > Von: Mehner, Bj�rn > Gesendet: Dienstag, 16. Dezember 2003 16:09 > An: POI Users List (E-Mail) > Betreff: Bad Filedescriptor > > > I am getting following exception when writing a workbook to file: > > java.io.IOException: Bad file descriptor > at java.io.FileOutputStream.writeBytes(Native Method) > at java.io.FileOutputStream.write(FileOutputStream.java:203) > at > org.apache.poi.poifs.storage.BigBlock.doWriteData(BigBlock.java:91) > at > org.apache.poi.poifs.storage.HeaderBlockWriter.writeData(Heade > rBlockWrit > er.java:250) > at > org.apache.poi.poifs.storage.BigBlock.writeBlocks(BigBlock.java:122) > at > org.apache.poi.poifs.filesystem.POIFSFileSystem.writeFilesyste > m(POIFSFil > eSystem.java:299) > at > org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook. > java:746) > at > de.epos_cs.export.spreadsheet.excel.SaxExcelHandler.close(SaxE > xcelHandle > r.java:106) > at de.epos_cs.export.ExportImpl.close(ExportImpl.java:194) > at > de.epos_cs.exporttest.ExportTest.testMultiSheets(ExportTest.java:87) > at java.lang.reflect.Method.invoke(Native Method) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at junit.textui.TestRunner.doRun(TestRunner.java:116) > at junit.textui.TestRunner.doRun(TestRunner.java:109) > at junit.textui.TestRunner.run(TestRunner.java:72) > at de.epos_cs.exporttest.ExportTest.main(ExportTest.java:541) > > The file is completly new, that is gets freshly created. I generate > several sheets. Nothing very special. Not even many data. > Anybody any ideas what this could mean? > > Thanks in advance. > > ciao Bodo >
smime.p7s
Description: S/MIME cryptographic signature
