You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2005/06/27 15:18:41 UTC
DO NOT REPLY [Bug 35511] New: -
NullPointerException at org.apache.poi.hssf.record.SSTSerializer.calculateUnicodeSize
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35511>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35511
Summary: NullPointerException at
org.apache.poi.hssf.record.SSTSerializer.calculateUnicod
eSize
Product: POI
Version: 2.5
Platform: Other
OS/Version: other
Status: NEW
Severity: major
Priority: P2
Component: HSSF
AssignedTo: poi-dev@jakarta.apache.org
ReportedBy: tuduyen.tran@custserv.com
I am receiving a NullPointerException when I call Workbook.write(). The trace
is below. I've also attached the method in which I call write().
java.lang.NullPointerException
.at org.apache.poi.hssf.record.SSTSerializer.calculateUnicodeSize
(SSTSerializer.
.at org.apache.poi.hssf.record.SSTRecordSizeCalculator.getRecordSize
(SSTRecordSi
.at org.apache.poi.hssf.record.SSTRecord.getRecordSize(SSTRecord.java:499)
.at org.apache.poi.hssf.model.Workbook.getSize(Workbook.java:756)
.at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:768)
.at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:732)
.at com.timeinc.tcs.compsub.admin.DisplayXLS.process(DisplayXLS.java:132)
.at com.timeinc.tcs.compsub.admin.DisplayXLS.doGet(DisplayXLS.java:59)
=============================================================================
public String process() throws IOException{
//System.out.println("***"+props.SHEETNAME_RPT);
File temp = File.createTempFile("CSB",".xls");
temp.deleteOnExit();
try{
// SET UP WORKBOOK AND SHEETS
wb = getTemplate();
setStyles();
setReportSheet();
setReportHeaderSheet();
setInstructionSheet();
BufferedOutputStream bos = new BufferedOutputStream(new
FileOutputStream(temp));
wb.write(bos);
bos.flush();
bos.close();
} catch (Exception e) {
e.printStackTrace(System.out);
}
return temp.getCanonicalPath();
}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/