> Sorry, I cannot say something any longer to implementation details of
such old versions
Okay, I upgraded to 1.4.2 at least while I try to debug this.

> Did you try declaring the Map as transient?

If you mean the "transient" Java keyword on the private field, then no I
hadn't, but I do that now and I think that is addressing some of my need
(Thanks! I didn't know XStream observed the transient keyword). I don't
think the problem is now coming from the Map. I still get OutOfMemoryError,
but it is coming from a class that the class I'm trying to marshal extends.
How do I get rid of that variable since it is a framework source that I
cannot modify?

So, we'll call the target class X and it extends Y. It contains a class,
we'll call Z which also has a reference to X.

class X extends Y { }

//Class I cannot modify follows:
class Y {
  private Z z;
  // z contains an instance of X
}

When XStream marshals, it is marshalling X, Y and Z and since Z contains X,
X gets marshalled until out of memory.

Any thoughts on how to solve that problem?

Reply via email to