java.lang.IndexOutOfBoundsException: Block 33 not found

Stack Overflow | Cyberpixel | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    IndexOutOfBoundsException when using the write method on a Apache POI HSSFWorkbook

    Stack Overflow | 7 months ago | Cyberpixel
    java.lang.IndexOutOfBoundsException: Block 33 not found

    Root Cause Analysis

    1. java.lang.IndexOutOfBoundsException

      Unable to read 512 bytes from 17408 in stream of length -1 at org.apache.poi.poifs.nio.ByteArrayBackedDataSource.read(ByteArrayBackedDataSource.java:42)

      at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.getBlockAt()
    2. POI
      HSSFWorkbook.write
      1. org.apache.poi.poifs.filesystem.NPOIFSFileSystem.getBlockAt(NPOIFSFileSystem.java:484)
      2. org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:169)
      3. org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:142)
      4. org.apache.poi.poifs.filesystem.NDocumentInputStream.readFully(NDocumentInputStream.java:248)
      5. org.apache.poi.poifs.filesystem.NDocumentInputStream.read(NDocumentInputStream.java:150)
      6. org.apache.poi.poifs.filesystem.DocumentInputStream.read(DocumentInputStream.java:125)
      7. org.apache.poi.hpsf.PropertySet.isPropertySetStream(PropertySet.java:336)
      8. org.apache.poi.hpsf.PropertySet.<init>(PropertySet.java:241)
      9. org.apache.poi.hpsf.PropertySetFactory.create(PropertySetFactory.java:92)
      10. org.apache.poi.POIDocument.getPropertySet(POIDocument.java:211)
      11. org.apache.poi.POIDocument.getPropertySet(POIDocument.java:168)
      12. org.apache.poi.POIDocument.readProperties(POIDocument.java:141)
      13. org.apache.poi.POIDocument.getSummaryInformation(POIDocument.java:108)
      14. org.apache.poi.POIDocument.writeProperties(POIDocument.java:260)
      15. org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1377)
      15 frames
    3. model
      main.main
      1. model.main.organizeSheets(main.java:377)
      2. model.main.main(main.java:42)
      2 frames