You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Alessio Pace <al...@gmail.com> on 2006/02/10 17:13:37 UTC

[Digester] xpp throws an ArrayIndexOutOfBoundsException with very long text nodes

Hi,

I am using commons-digester-1.7 with xpp-1.1.3.4.0 (compile from xpp
repository) and with an input XML that is like:

<root>
    <foo>
        <bar><![CDATA[ "VERY VERY LONG CONTENT" ]]></bar>
    </foo>
    ...
</root>

I get this stack trace when it is the point of parsing the <bar> element

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.gjt.xpp.impl.tokenizer.Tokenizer.next(Tokenizer.java:1274)
    at org.gjt.xpp.impl.pullparser.PullParser.next(PullParser.java:392)
    at org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:415)
    at org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
    at org.apache.commons.digester.Digester.parse(Digester.java:1685)


Other infos:
I tried also with xpp-1.1.3.4-RC8 (the lastest on ibiblio maven2 repository)
with the same results.


Is it something related *only* to xpp (the
org.gjt.xpp.impl.tokenizer.Tokenizer  class) or is it something related also
to Digester?

Thanks in advance for any suggestion,

--
Alessio Pace.

Re: [Digester] xpp throws an ArrayIndexOutOfBoundsException with very long text nodes

Posted by Valerio Schiavoni <va...@gmail.com>.
Hi Simon,
togheter with Alessio we were able to reproduce the bug in isolation outside
digester.
We arised a bug at their bugzilla:
http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=238

and a testcase was attached.
We hope they'll fix it :-)



On 2/11/06, Simon Kitching <sk...@apache.org> wrote:
>
> Hi Alessio,
>
> This doesn't seem to be a problem with Digester; from the stack trace it
> looks to me like it is org.gjt.xpp that needs to be fixed.
>
> Does this problem occur if you simply use this xpp parser to parse the
> document directly, without using Digester at all? If so, you need to
> follow up with the xpp team.
>
> Regards,
>
> Simon
>
> On Fri, 2006-02-10 at 17:48 +0100, Alessio Pace wrote:
> > Another hint:
> >
> > if instead of:
> >    <bar><![CDATA[ "VERY VERY LONG CONTENT" ]]></bar>
> >
> > I have:
> >    <bar>"VERY VERY LONG CONTENT"</bar>
> >
> > (so without the CDATA) it works.
> >
> > On 2/10/06, Alessio Pace <al...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I am using commons-digester-1.7 with xpp-1.1.3.4.0 (compile from xpp
> > > repository) and with an input XML that is like:
> > >
> > > <root>
> > >     <foo>
> > >         <bar><![CDATA[ "VERY VERY LONG CONTENT" ]]></bar>
> > >     </foo>
> > >     ...
> > > </root>
> > >
> > > I get this stack trace when it is the point of parsing the <bar>
> element
> > >
> > > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
> > >     at java.lang.System.arraycopy(Native Method)
> > >     at org.gjt.xpp.impl.tokenizer.Tokenizer.next(Tokenizer.java:1274)
> > >     at org.gjt.xpp.impl.pullparser.PullParser.next(PullParser.java
> :392)
> > >     at org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:415)
> > >     at org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
> > >     at org.apache.commons.digester.Digester.parse(Digester.java:1685)
> > >
> > >
> > > Other infos:
> > > I tried also with xpp-1.1.3.4-RC8 (the lastest on ibiblio maven2
> > > repository) with the same results.
> > >
> > >
> > > Is it something related *only* to xpp (the
> > > org.gjt.xpp.impl.tokenizer.Tokenizer  class) or is it something
> related
> > > also to Digester?
> > >
> > > Thanks in advance for any suggestion,
> > >
> > > --
> > > Alessio Pace.
> >
> >
> >
> >
> > --
> > Alessio Pace.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


--
To Iterate is Human, to Recurse, Divine
James O. Coplien, Bell Labs
(how good is to be human indeed)

Re: [Digester] xpp throws an ArrayIndexOutOfBoundsException with very long text nodes

Posted by Simon Kitching <sk...@apache.org>.
Hi Alessio,

This doesn't seem to be a problem with Digester; from the stack trace it
looks to me like it is org.gjt.xpp that needs to be fixed.

Does this problem occur if you simply use this xpp parser to parse the
document directly, without using Digester at all? If so, you need to
follow up with the xpp team.

Regards,

Simon

On Fri, 2006-02-10 at 17:48 +0100, Alessio Pace wrote:
> Another hint:
> 
> if instead of:
>    <bar><![CDATA[ "VERY VERY LONG CONTENT" ]]></bar>
> 
> I have:
>    <bar>"VERY VERY LONG CONTENT"</bar>
> 
> (so without the CDATA) it works.
> 
> On 2/10/06, Alessio Pace <al...@gmail.com> wrote:
> >
> > Hi,
> >
> > I am using commons-digester-1.7 with xpp-1.1.3.4.0 (compile from xpp
> > repository) and with an input XML that is like:
> >
> > <root>
> >     <foo>
> >         <bar><![CDATA[ "VERY VERY LONG CONTENT" ]]></bar>
> >     </foo>
> >     ...
> > </root>
> >
> > I get this stack trace when it is the point of parsing the <bar> element
> >
> > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
> >     at java.lang.System.arraycopy(Native Method)
> >     at org.gjt.xpp.impl.tokenizer.Tokenizer.next(Tokenizer.java:1274)
> >     at org.gjt.xpp.impl.pullparser.PullParser.next(PullParser.java:392)
> >     at org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:415)
> >     at org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
> >     at org.apache.commons.digester.Digester.parse(Digester.java:1685)
> >
> >
> > Other infos:
> > I tried also with xpp-1.1.3.4-RC8 (the lastest on ibiblio maven2
> > repository) with the same results.
> >
> >
> > Is it something related *only* to xpp (the
> > org.gjt.xpp.impl.tokenizer.Tokenizer  class) or is it something related
> > also to Digester?
> >
> > Thanks in advance for any suggestion,
> >
> > --
> > Alessio Pace.
> 
> 
> 
> 
> --
> Alessio Pace.


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


Re: [Digester] xpp throws an ArrayIndexOutOfBoundsException with very long text nodes

Posted by Alessio Pace <al...@gmail.com>.
Another hint:

if instead of:
   <bar><![CDATA[ "VERY VERY LONG CONTENT" ]]></bar>

I have:
   <bar>"VERY VERY LONG CONTENT"</bar>

(so without the CDATA) it works.

On 2/10/06, Alessio Pace <al...@gmail.com> wrote:
>
> Hi,
>
> I am using commons-digester-1.7 with xpp-1.1.3.4.0 (compile from xpp
> repository) and with an input XML that is like:
>
> <root>
>     <foo>
>         <bar><![CDATA[ "VERY VERY LONG CONTENT" ]]></bar>
>     </foo>
>     ...
> </root>
>
> I get this stack trace when it is the point of parsing the <bar> element
>
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
>     at java.lang.System.arraycopy(Native Method)
>     at org.gjt.xpp.impl.tokenizer.Tokenizer.next(Tokenizer.java:1274)
>     at org.gjt.xpp.impl.pullparser.PullParser.next(PullParser.java:392)
>     at org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:415)
>     at org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
>     at org.apache.commons.digester.Digester.parse(Digester.java:1685)
>
>
> Other infos:
> I tried also with xpp-1.1.3.4-RC8 (the lastest on ibiblio maven2
> repository) with the same results.
>
>
> Is it something related *only* to xpp (the
> org.gjt.xpp.impl.tokenizer.Tokenizer  class) or is it something related
> also to Digester?
>
> Thanks in advance for any suggestion,
>
> --
> Alessio Pace.




--
Alessio Pace.