users@jaxb.java.net

Re: Cycle Exception

From: Andrew Wellman <aj_at_wellmans.com>
Date: Sun, 13 Apr 2003 13:58:21 -0600

Well it has taken me a while -- as you can tell by the month in between posts -- but I have
been able to validate that this was indeed the problem. I was not creating a "cyclical"
reference by having two objects point at each other, but rather because I had the same
object in my content tree twice. It was a bug in my application, but seems like this might
be a problem in JAXB as I can imagine there are times where one object could appear twice
as discussed by Chris.

Regards,
Andrew Wellman

On Sun, 16 Mar 2003 13:57:26 -0700
Chris Handorf <chris_at_CYBERTRAILS.COM> wrote:

> Hi Kohsuke,
>
> Just an FYI - with the JAXB early access release, I used to get a Cycle Exception
> if I had code like the following:
>
> SomeObject s = new SomeObject();
> SomeOtherObject o = new SomeOtherObject();
>
> o.setfirstItem(s);
> o.setSecondItem(s);
> // now marshall object o
>
> The SomeObject appears twice in the content tree, but it is clearly not a cycle.
> I considered this a bug in the early access and it took me a little while to work around.
> I am hoping the 1.0 release is now different.