poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Callaghan <sccll...@yahoo.com>
Subject Re: Null Pointer Exception in WorkbookFactory.create(input-stream)
Date Tue, 12 Jan 2010 15:57:12 GMT
Hi Nick,

Thanks for the response. I am happy to send you the file that I used.

I am little new to POI. How do I upload the file? Is there a link to do this? I can also attach
the file and send it directly to your email address.

- Scott

From: Nick Burch <nick.burch@alfresco.com>
To: POI Users List <user@poi.apache.org>
Sent: Tue, January 12, 2010 5:48:58 AM
Subject: Re: Null Pointer Exception in WorkbookFactory.create(input-stream)

On Mon, 11 Jan 2010, Scott Callaghan wrote:
> I get a null pointer exception when I use a WorkbookFactory.create()
> java.lang.NullPointerException
>    at org.apache.poi.util.PackageHelper.copy(PackageHelper.java:129)
>    at org.apache.poi.util.PackageHelper.clone(PackageHelper.java:87)
>    at org.apache.poi.util.PackageHelper.clone(PackageHelper.java:44)
>    at org.apache.poi.POIXMLDocument.ensureWriteAccess(POIXMLDocument.java:185)
>    at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:169)
>    at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:63)

This looks to me like there's something corrupt in the relationship definitions in your file.
Can you upload the file so we can take a look?

(When you pass in an input stream, we have to do an in-memory buffer/copy to work on it. You'll
save memory by passing the file directly to opcpackage, but that requires you to know it's
xssf ahead of time)


To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message