You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Amit <am...@gmail.com> on 2007/07/23 15:26:06 UTC
java.lang.StackOverflowError exception
Hi All,
I am using Digester to parse an xml file as follows
Bundle bundle = Platform.getBundle("id");
Path path = new Path("myDir/first.xml");
URL url = FileLocator.find(bundle, path, null);
digester.parse(url);
but the problem is that everytime it throws me
java.lang.StackOverflowErrorexception
Exception in thread "Thread-2" java.lang.StackOverflowError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
It seems like the parsing is going in infinite loop.
Can anyone suggest what is wrong with this appraoch or do I have to call
parse method in another way..?
Thanks,
Amit
Re: java.lang.StackOverflowError exception
Posted by Amit <am...@gmail.com>.
Hi Simon,
Thanks for replying, but I already managed to fix the problem :)
On 7/23/07, simon <si...@chello.at> wrote:
>
> On Mon, 2007-07-23 at 15:26 +0200, Amit wrote:
> > Hi All,
> >
> > I am using Digester to parse an xml file as follows
> >
> > Bundle bundle = Platform.getBundle("id");
> > Path path = new Path("myDir/first.xml");
> > URL url = FileLocator.find(bundle, path, null);
> > digester.parse(url);
> >
> >
> > but the problem is that everytime it throws me
> > java.lang.StackOverflowErrorexception
> >
> > Exception in thread "Thread-2" java.lang.StackOverflowError
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
> > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> > Source)
> > at java.lang.reflect.Constructor.newInstance(Unknown Source)
> > at java.lang.Class.newInstance0(Unknown Source)
> >
> > It seems like the parsing is going in infinite loop.
> > Can anyone suggest what is wrong with this appraoch or do I have to
> > call
> > parse method in another way..?
>
> Sorry, there isn't enough info in your email to offer an opinion on
> this. All the stack trace indicates is that something somewhere is
> calling newInstance. That's not enough to do much with...
>
> Please provide:
> (1) a fuller stack trace
> (2) the value of the "url" parameter
> (3) the digester rules (if they aren't too long)
>
> Regards,
>
> Simon
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
<a href="http://www.spreadfirefox.com/?q=affiliates&id=111787&t=1">Get
Firefox!</a>
Re: java.lang.StackOverflowError exception
Posted by simon <si...@chello.at>.
On Mon, 2007-07-23 at 15:26 +0200, Amit wrote:
> Hi All,
>
> I am using Digester to parse an xml file as follows
>
> Bundle bundle = Platform.getBundle("id");
> Path path = new Path("myDir/first.xml");
> URL url = FileLocator.find(bundle, path, null);
> digester.parse(url);
>
>
> but the problem is that everytime it throws me
> java.lang.StackOverflowErrorexception
>
> Exception in thread "Thread-2" java.lang.StackOverflowError
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
> at java.lang.Class.newInstance0(Unknown Source)
>
> It seems like the parsing is going in infinite loop.
> Can anyone suggest what is wrong with this appraoch or do I have to
> call
> parse method in another way..?
Sorry, there isn't enough info in your email to offer an opinion on
this. All the stack trace indicates is that something somewhere is
calling newInstance. That's not enough to do much with...
Please provide:
(1) a fuller stack trace
(2) the value of the "url" parameter
(3) the digester rules (if they aren't too long)
Regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org