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)
Insufficient information.
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.
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.
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
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.
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.
Created attachment 4246 [details] sample xls
Do u guys have any work-around or fix for this??
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.