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 <[email protected]>
To: POI Users List <[email protected]>
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)

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


      

Reply via email to