You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by João Miguel Penetra <mi...@gmail.com> on 2015/05/11 12:55:22 UTC
NPE on OPCPackage
Hello,
I have a web site where users can upload CSV and XLSX files and I use
Apache-POI to parse XLSX files. However, I discovered something unusual.
When I convert a CSV file to XLSX on Excel 2013 I get a NPE while
initializing XSSFReader:
java.lang.NullPointerException
at org.apache.poi.openxml4j.opc.OPCPackage.getPart(OPCPackage.java:625)
at org.apache.poi.xssf.eventusermodel.XSSFReader.<init>(XSSFReader.java:67)
file.exists() returns true.
I asked someone to convert the same file for me with Excel 2011 and the
error disappears. I've tried this with poi-3.11 and 3.9 and respective
dependencies with the same result.
Sample files are attached.
Thanks,
João Miguel Penetra
Re: NPE on OPCPackage
Posted by João Miguel Penetra <mi...@gmail.com>.
Thanks for the quick response.
The bug is here: https://bz.apache.org/bugzilla/show_bug.cgi?id=57914
On 11 May 2015 at 11:58, Nick Burch <ap...@gagravarr.org> wrote:
> On Mon, 11 May 2015, João Miguel Penetra wrote:
>
>> I have a web site where users can upload CSV and XLSX files and I use
>> Apache-POI to parse XLSX files. However, I discovered something unusual.
>> When I convert a CSV file to XLSX on Excel 2013 I get a NPE while
>> initializing XSSFReader:
>>
>> java.lang.NullPointerException
>> at org.apache.poi.openxml4j.opc.OPCPackage.getPart(OPCPackage.java:625)
>> at
>> org.apache.poi.xssf.eventusermodel.XSSFReader.<init>(XSSFReader.java:67)
>>
>
> That's an odd one. Any chance you could raise a new bug for this in
> bugzilla - http://issues.apache.org/bugzilla/buglist.cgi?product=POI -
> and upload the excel file that triggers it?
>
> Nick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
--
João Miguel Penetra
Re: NPE on OPCPackage
Posted by Nick Burch <ap...@gagravarr.org>.
On Mon, 11 May 2015, João Miguel Penetra wrote:
> I have a web site where users can upload CSV and XLSX files and I use
> Apache-POI to parse XLSX files. However, I discovered something unusual.
> When I convert a CSV file to XLSX on Excel 2013 I get a NPE while
> initializing XSSFReader:
>
> java.lang.NullPointerException
> at org.apache.poi.openxml4j.opc.OPCPackage.getPart(OPCPackage.java:625)
> at org.apache.poi.xssf.eventusermodel.XSSFReader.<init>(XSSFReader.java:67)
That's an odd one. Any chance you could raise a new bug for this in
bugzilla - http://issues.apache.org/bugzilla/buglist.cgi?product=POI - and
upload the excel file that triggers it?
Nick