Bug 15546 - POI Error
Summary: POI Error
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POIFS (show other bugs)
Version: 1.5.1
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-19 22:25 UTC by Monica
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
sample xls (13.50 KB, application/octet-stream)
2002-12-20 19:58 UTC, Monica
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Monica 2002-12-19 22:25:19 UTC
The following error has happened when POI was run on J2SE v 1.4.1

Invalid header signature; read 4547016314657521471, expected -
2226271756974174256
java.io.IOException: Invalid header signature; read 4547016314657521471, 
expected -2226271756974174256
        at org.apache.poi.poifs.storage.HeaderBlockReader.<init>
(HeaderBlockReader.java:124)
        at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>
(POIFSFileSystem.java:120)
Comment 1 Andy Oliver 2002-12-19 22:37:00 UTC
Insufficient information. 
Comment 2 Monica 2002-12-19 22:54:30 UTC
All I do is this
 POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(a_File));

This worked with J2SE v 1.2.2
Now we are using J2SE v 1.4.1

and I see this error. 
Comment 3 Avik Sengupta 2002-12-20 05:23:03 UTC
try 
1. recompile the source using 1.4 
2. what os are you on? check your LANG env variable if you are on Linux
3. POI is regularly tested on 1.4 AND 1.3 by various people. So please recheck
your local environment. 
Comment 4 Monica 2002-12-20 13:56:48 UTC
Hi,
  I did recomplie the source using 1.4 and I still see the same error.
OS is Linux and the LANG env is C
Comment 5 Avik Sengupta 2002-12-20 15:25:17 UTC
i meant the "LANG" environment variable. try
$ echo $LANG

for any additional help, you will also need to provide example worksheet, the
least amount of code that shows this problem. I presume you are using 1.5.1?
maybe you should try a dev build to see what you get. 
Comment 6 Monica 2002-12-20 15:33:28 UTC
I meant earlier that the LANG env is set to C.
I used POI-1.5 earlier. Since it did not work, I tried to 
get jakarta-poi-1.8.0-dev-src.zip  from dev, recompiled it using 1.4.1
and I see the header error.

POI-1.5  worked perfectly when we used J2SE v 1.2.2.

The only thing I do is 
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(a_FileName));
HSSFWorkbook wb = new HSSFWorkbook(fs);

It breaks right where I do a new POIFSFileSystem.

You can try to use a simple spread sheet with probably 3 columns.
Comment 7 Monica 2002-12-20 19:58:15 UTC
Created attachment 4246 [details]
sample xls
Comment 8 Monica 2002-12-23 14:06:47 UTC
Do u guys have any work-around or fix for this??
Comment 9 Andy Oliver 2002-12-23 15:21:13 UTC
please try a nightly build.  If it works with that then this is the NLS_LANG
bug.  (default system encoding).  Please read this
http://nagoya.apache.org/wiki/apachewiki.cgi?POIBugReport for information on how
you can help this analysis proceed further.