You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Branden Visser <mr...@gmail.com> on 2017/07/27 16:21:25 UTC

ArrayStoreException when running getShapes on slide of XSLFSheet

Hi all,

We process quite a few files out in the wild. Currently, this is by
far the most common error we see when we handle office documents (Word
+ PowerPoint):

java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at org.apache.xmlbeans.impl.values.XmlObjectBase._typedArray(XmlObjectBase.java:409)
        at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:457)
        at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:415)
        at org.apache.poi.xslf.usermodel.XSLFDrawing.<init>(XSLFDrawing.java:44)
        at org.apache.poi.xslf.usermodel.XSLFSheet.initDrawingAndShapes(XSLFSheet.java:170)
        at org.apache.poi.xslf.usermodel.XSLFSheet.getShapes(XSLFSheet.java:157)
        ...

Unfortunately, I don't have any sample documents at this time that
exhibit the issue to send over as most of it is client data. Looks
like it's coming deep from within XMLBeans.

The System.arraycopy is occurring on an XMLObject[] that is mixed with
2 schema types of elements:

 * T=CT_NonVisualDrawingProps@http://schemas.openxmlformats.org/drawingml/2006/main
 * N=

Whereas it was expecting all NonVisualDrawingProps elements. So,
likely an unexpected collection of items, in the crazy world of XML
files that is office documents.

Has anyone seen this before? Should POI be defending against this case
any better?

Thanks,
Branden

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


Re: ArrayStoreException when running getShapes on slide of XSLFSheet

Posted by Branden Visser <mr...@gmail.com>.
Thanks all for your replies. I've found the issue was that I was
running xmlbeans 2.3. Upgrading to 2.6 resolves the issue.

Best,
Branden

On Fri, Jul 28, 2017 at 6:26 AM, Andreas Beeker <ki...@apache.org> wrote:
> Hi Branden,
>
> can you send me a file? ... I won't put it in our repo.
>
> Andi
>
>

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


Re: ArrayStoreException when running getShapes on slide of XSLFSheet

Posted by Andreas Beeker <ki...@apache.org>.
Hi Branden,

can you send me a file? ... I won't put it in our repo.

Andi



Re: ArrayStoreException when running getShapes on slide of XSLFSheet

Posted by Bob Cochran <r2...@gmail.com>.
Hi!

What version of POI are you using? Can you share your source code which exhibits the error? Can you put together a PowerPoint document that when processed by your code will trigger the error? I think you need to share your source code and at least one test document to show a repeatable error. A stack trace as you give below is not enough. 

Thanks a ton

Bob Cochran 

> On Jul 27, 2017, at 12:21 PM, Branden Visser <mr...@gmail.com> wrote:
> 
> Hi all,
> 
> We process quite a few files out in the wild. Currently, this is by
> far the most common error we see when we handle office documents (Word
> + PowerPoint):
> 
> java.lang.ArrayStoreException
>        at java.lang.System.arraycopy(Native Method)
>        at org.apache.xmlbeans.impl.values.XmlObjectBase._typedArray(XmlObjectBase.java:409)
>        at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:457)
>        at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:415)
>        at org.apache.poi.xslf.usermodel.XSLFDrawing.<init>(XSLFDrawing.java:44)
>        at org.apache.poi.xslf.usermodel.XSLFSheet.initDrawingAndShapes(XSLFSheet.java:170)
>        at org.apache.poi.xslf.usermodel.XSLFSheet.getShapes(XSLFSheet.java:157)
>        ...
> 
> Unfortunately, I don't have any sample documents at this time that
> exhibit the issue to send over as most of it is client data. Looks
> like it's coming deep from within XMLBeans.
> 
> The System.arraycopy is occurring on an XMLObject[] that is mixed with
> 2 schema types of elements:
> 
> * T=CT_NonVisualDrawingProps@http://schemas.openxmlformats.org/drawingml/2006/main
> * N=
> 
> Whereas it was expecting all NonVisualDrawingProps elements. So,
> likely an unexpected collection of items, in the crazy world of XML
> files that is office documents.
> 
> Has anyone seen this before? Should POI be defending against this case
> any better?
> 
> Thanks,
> Branden
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 

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


Re: ArrayStoreException when running getShapes on slide of XSLFSheet

Posted by "pj.fanning" <fa...@yahoo.com>.
Can I clarify? This issue occurs consistently for specific input files or is
it an intermittent issue?



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/ArrayStoreException-when-running-getShapes-on-slide-of-XSLFSheet-tp5728358p5728359.html
Sent from the POI - User mailing list archive at Nabble.com.

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