https://issues.apache.org/bugzilla/show_bug.cgi?id=44774





--- Comment #4 from Josh Micich <[EMAIL PROTECTED]>  2008-04-10 00:52:39 PST ---
(In reply to comment #1)
> Created an attachment (id=21791)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21791) [details]
> ... java.io.IOException: Cannot remove block[ 215 ]; out of range
> ...

I get "Cannot remove block[ 454 ]; out of range".  (I assume you accidentally
copied the stack trace from the attachment 21792.

(In reply to comment #2)
> Created an attachment (id=21792)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21792) [details]
> ... java.io.IOException: Cannot remove block[ 215 ]; out of range
> ...

I get this error exactly. The following test code hits the same error, without
HSSFWorkbook:

try {
  InputStream is = new FileInputStream("ex44774-21792.xls");
  new POIFSFileSystem(is);
} catch (IOException e) {
  if (e.getMessage().equals("Cannot remove block[ 215 ]; out of range")) {
    throw new AssertionFailedError("Identified bug 44774");
  }
  throw new RuntimeException(e);
}

I tried this code out against poi-3.0.2-FINAL-20080204.jar and got a different
error:

java.lang.RuntimeException: java.io.IOException: Unable to read entire block;
479 bytes read before EOF; expected 512 bytes
        at example.poi.Test44774.test44774(Test44774.java:43)
Caused by: java.io.IOException: Unable to read entire block; 479 bytes read
before EOF; expected 512 bytes
        at
org.apache.poi.poifs.storage.RawDataBlock.<init>(RawDataBlock.java:78)
        at
org.apache.poi.poifs.storage.RawDataBlock.<init>(RawDataBlock.java:50)
        at
org.apache.poi.poifs.storage.RawDataBlockList.<init>(RawDataBlockList.java:52)
        at
org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:93)
        at example.poi.Test44774.test44774b(Test44774.java:38)
        ... 18 more

There seems to have been some work done in this area recently.
(see bugzilla bug 28231 and bug 35928 / svn r634318 and r636786)

Hopefully someone with more knowledge of POIFS can help diagnose this further.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to