Thanks for the reply. I tried the event model and that also works with the stand alone application but fails to work in the webserver upload environment.. Somehow I have a feeling that this may be a memory issue bcoz smaller files go thro the upload process without any error but when I tried event model with a big xls, weblogic hung and threw junk characters.. I have also downloaded the latest 2.0 model and I will try the same thing with them. I am also planning to try with different heap size options.. just a doubt.. what is the memory requirement for processing xls files ? meaning proportionately how much memory would be needed in the heap to process 600k , 1 mb, 2 mb xls files ?
Shyamala. -----Original Message----- From: Avik Sengupta [mailto:[EMAIL PROTECTED] Sent: Saturday, August 16, 2003 5:18 AM To: POI Users List Subject: Re: RE: hssf upload file issue Our experience has been that reading an excel file works in one setup, and not in another, its usually the case that the file has been corrupted in transit. Thousands of files are read everyday by POI :) That said, in the last two years, there have been only TWO bugs reported in the basic reading code that can cause issues in one environment and not the other. You need to check if one of them is hitting you 1. You are directly sending the stream you get from the form upload to POI. Depending on how the form upload servlet works, you might hit the slow input stream problem. To work around, save the file to a temp directory, and pass the file name to poi. Thats the best solution. Or else, there is a bufferedinputstream in contrib, that you might want to check. 2. If you are using a version prior to 2.0pre2, you might be hitting the concurrency bug if you are processing more than one workbook at a time. Upgrade, or even backporting the patch is not difficult. If you can conclusively rule out either of these, check out your form upload code.. something is getting corrupted in the process. -------Original Message------- > From: Narasimhan, Shyamala <[EMAIL PROTECTED]> > Subject: RE: hssf upload file issue > Sent: 15 Aug 2003 23:21:33 > > Also I get this error at times > > java.lang.ArrayIndexOutOfBoundsException > at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:557) > at org.apache.poi.util.LittleEndian.getUShort(LittleEndian.java:102) > at > org.apache.poi.hssf.record.SSTDeserializer.manufactureStrings(SSTDeserialize > r.java:129) > at > org.apache.poi.hssf.record.SSTDeserializer.readStringRemainder(SSTDes > erializer.java:359) > at > org.apache.poi.hssf.record.SSTDeserializer.processContinueRecord(SSTD > eserializer.java:320) > at > org.apache.poi.hssf.record.SSTRecord.processContinueRecord(SSTRecord. > java:539) > at > org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory. > java:218) > at > org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:1 > 91) > at > org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:1 > 58) > > -----Original Message----- > From: Narasimhan, Shyamala [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2003 2:07 PM > To: '[EMAIL PROTECTED]' > Subject: hssf upload file issue > > Hi > > I am trying to convert (to hssf) an xls file uploaded through struts on a > weblogic server.. the file gets converted if I use a standalone java > application but fails when uploaded through the web. The file contains more > than 2000 rows. This is the code that converts the file > > > > // get the file from form > > FormFile prodFile = uploadForm.getFile(); > > String fileName = prodFile.getFileName(); > > log__.info("file name = " + fileName + "... fileSize = " + > prodFile.getFileSize()); > > POIFSFileSystem fs = new POIFSFileSystem(prodFile.getInputStream()); > > > > HSSFWorkbook wb = null; > > try { > > wb = new HSSFWorkbook(fs); > > } > > catch (Exception e){ > > e.printStackTrace(); > > } > > > > This is the error that I am getting > > java.lang.NegativeArraySizeException > > at > org.apache.poi.hssf.record.SSTDeserializer.readStringRemainder(SSTDes > > erializer.java:335) > > at > org.apache.poi.hssf.record.SSTDeserializer.processContinueRecord(SSTD > > eserializer.java:320) > > at > org.apache.poi.hssf.record.SSTRecord.processContinueRecord(SSTRecord. > > java:539) > > at > org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory. > > java:218) > > at > org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:1 > > 91) > > at > org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:1 > > 58) > > at > com.om.client.ui.struts.action.pmf.supplierfeed.UploadProductListActi > > on.perform(UploadProductListAction.java:102) > > > > can anybody pls help. > > Thanks > > Shyamala. -------Original Message-------
