2 Replies Latest reply on Aug 1, 2006 7:23 PM by clebert.suconic

    StackOverflow in my datatypes

    issahar

      Hi.
      I need to serialize a graph that is implemented as HashMap.
      This graph is very complicated, and the java serialization gives StackOverflowError.
      I tried Jboss Serialization, and it gives TargetInvocationException, which just wrapped a StackOverflowError.
      can something be done?
      is it being addressed?
      I need some help, and quick...
      thanx,
      Issahar.

        • 1. Re: StackOverflow in my datatypes
          clebert.suconic

          Both JBoss and Java Serialization uses a lot of recursivity.

          Your class has probably a very deep object graph. You probably have relationships between your objects, and every single object is a new object. (what is forcing the deep stack trace).

          If you have multiple objects with the same ID/PK, you should cache them trying to diminish the number of instances in your graph.

          • 2. Re: StackOverflow in my datatypes
            clebert.suconic

            Another way to address this is by increasing your JVM's stack size (-Xss)

            That would give you more room for recursive calls