commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [betwixt]: Cycles cause StackOverflowError when registering bean
Date Tue, 13 Jan 2004 20:56:52 GMT
hi

which version are you using? (i have a feeling that this bug has been  
fixed already but i might be wrong...)

if you're using the alpha, i'd suggest upgrading to CVS HEAD (you'll  
need commons-beanutils 1.6.1 and commons-digester 1.5).

- robert

On 13 Jan 2004, at 19:38, b p wrote:

> Hi,
>
> I have been investigating Betwixt and run into an issue with cycles.   
> I have 3 beans with a cycle:
> A->-B
> B->C
> C->A
>
> I'm able to generate XML successfully, but not read it.  When I call  
> BeanReader.registerBeanClass(A) I get a StackOverflowError (printed  
> below).  If I take out the cycle, it works fine.  I performed the test  
> using the binary distribution 20040113.
>
> Does betwixt support cycles?  If so, is there something specific I  
> need to do to avoid what appears to be a recursive infinite loop?
>
> Thanks in advance,
>
> Brian
>
> java.lang.StackOverflowError
>  at java.lang.Object.hashCode(Native Method)
>  at java.util.HashMap.hash(HashMap.java:261)
>  at java.util.HashMap.get(HashMap.java:317)
>  at  
> org.apache.commons.betwixt.registry.DefaultXMLBeanInfoRegistry.get(Defa 
> ultXMLBeanInfoRegistry.java:88)
>  at  
> org.apache.commons.betwixt.XMLIntrospector.introspect(XMLIntrospector.j 
> ava:326)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.getElementDesc 
> riptor(BeanRuleSet.java:448)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addChildRules( 
> BeanRuleSet.java:307)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(BeanRu 
> leSet.java:515)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(BeanRu 
> leSet.java:495)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addChildRules( 
> BeanRuleSet.java:402)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(BeanRu 
> leSet.java:515)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(BeanRu 
> leSet.java:495)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addChildRules( 
> BeanRuleSet.java:402)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(BeanRu 
> leSet.java:515)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(BeanRu 
> leSet.java:495)
>  at  
> org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addChildRules( 
> BeanRuleSet.java:402)
> ...
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes


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


Mime
View raw message