Loading ...
Sorry, an error occurred while loading the content.

Re: OutOfMemoryError (was: [JSX] Strange errors)

Expand Messages
  • Brendan Macmillan
    Hi Stefan, ... OK... JSX now does some internal buffering to cope with some unusual cases in Java s Serialization. If you are serializing a very large graph
    Message 1 of 9 , Dec 17, 2002
    View Source
    • 0 Attachment
      Hi Stefan,

      > > The probem was found and fixed on 12 March 2002, as a result of
      > > Kevin Day's comments - you must be using a very old version, because
      > > the Exception you reported was commented out on that date ;-)
      >
      > Hi everybody,
      > thanks for your help. It actually works. It's hard to keep the jars up to
      > date once you've got more than 40 in your project ;-)
      > Unfortunately I still get an OutOfMemoryError when trying to serialize my
      > object. I thought that could be triggered by the other error, but
      > unfortunately it's not. Oddly enough I never had the problem before. It even
      > worked with normal configuration, now I've set the heap to 256m

      OK... JSX now does some internal buffering to cope with some
      unusual cases in Java's Serialization. If you are serializing a very
      large graph (I'm guessing you are), then this could become a
      problem.

      JSX2's architecture is reorganized, so it doesn't have to do this
      buffering - unfortunately, it lacks some features that you need
      (such as the writeReplace we just looked at).

      If you would like to be a beta tester for JSX2, I can make the
      features you need a priority, to solve your problem. How does
      that sound?

      Note: JSX2 is *not* GPL - but it is free for academic use. Does
      that work for you?

      > > The reason why it is suddenly appearing for you is because (I bet) you
      > > are now serializing a class that you didn't use to in the past, which
      > > provoked this problem. I would guess it's because you upgraded to Java 1.4
      > > (Inet4Address doesn't exist in 1.3).
      > >
      >
      > I did that actually, but ~ 2 month ago and never had the problem before last
      > week.

      hmmmm... you expressed some surprise at the InetAddress, since you don't
      use URLs - so possibly this is just the first time they crept into the mix?


      > Thanks for your work
      My pleasure!! I hope you will like to be a beta-tester for JSX2


      Cheers,
      Brendan
    • Stefan Kuhn
      Hi Brendan, It would be a pleasure to help you by testing JSX2. Just to show you what I need: I want to serialize a class containing mainly String attributes,
      Message 2 of 9 , Dec 17, 2002
      View Source
      • 0 Attachment
        Hi Brendan,
        It would be a pleasure to help you by testing JSX2. Just to show you what I
        need: I want to serialize a class containing mainly String attributes, but
        also some Vectors and two objects which mainly consist of Arrays of Objects
        ... Not to complicated, I would have thought - at least it's easy to get much
        more complicated objects.
        Something which I find also strange is that on our production machine
        everything still works (with the old JSX!), just on my developement machine
        everything broke.
        Tell me when you think I could start testing JSX2. (Because I never bothered
        with the internals of JSX, I have no idea where writeReplace is used and what
        else is actually needed.)
        Stefan


        Am Dienstag, 17. Dezember 2002 10:27 schrieben Sie:
        > Hi Stefan,
        >
        > > > The probem was found and fixed on 12 March 2002, as a result of
        > > > Kevin Day's comments - you must be using a very old version, because
        > > > the Exception you reported was commented out on that date ;-)
        > >
        > > Hi everybody,
        > > thanks for your help. It actually works. It's hard to keep the jars up to
        > > date once you've got more than 40 in your project ;-)
        > > Unfortunately I still get an OutOfMemoryError when trying to serialize my
        > > object. I thought that could be triggered by the other error, but
        > > unfortunately it's not. Oddly enough I never had the problem before. It
        > > even worked with normal configuration, now I've set the heap to 256m
        >
        > OK... JSX now does some internal buffering to cope with some
        > unusual cases in Java's Serialization. If you are serializing a very
        > large graph (I'm guessing you are), then this could become a
        > problem.
        >
        > JSX2's architecture is reorganized, so it doesn't have to do this
        > buffering - unfortunately, it lacks some features that you need
        > (such as the writeReplace we just looked at).
        >
        > If you would like to be a beta tester for JSX2, I can make the
        > features you need a priority, to solve your problem. How does
        > that sound?
        >
        > Note: JSX2 is *not* GPL - but it is free for academic use. Does
        > that work for you?
        >
        > > > The reason why it is suddenly appearing for you is because (I bet) you
        > > > are now serializing a class that you didn't use to in the past, which
        > > > provoked this problem. I would guess it's because you upgraded to Java
        > > > 1.4 (Inet4Address doesn't exist in 1.3).
        > >
        > > I did that actually, but ~ 2 month ago and never had the problem before
        > > last week.
        >
        > hmmmm... you expressed some surprise at the InetAddress, since you don't
        > use URLs - so possibly this is just the first time they crept into the mix?
        >
        > > Thanks for your work
        >
        > My pleasure!! I hope you will like to be a beta-tester for JSX2
        >
        >
        > Cheers,
        > Brendan
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > JSX-ideas-unsubscribe@egroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

        --
        Stefan Kuhn M. A.
        MPI of Chemical Ecology, Winzerlaer Str. 10, Beutenberg Campus, 07745
        Jena, Germany
        Tel: +49(0)3641 571261 - Fax: +49(0)3641 571202
      • Brendan Macmillan
        ... Excellent!! ... OK, this should work with JSX2 as it is. Why not give it a try? http://jsx2.com/download.html Code looks like this at the moment, and is
        Message 3 of 9 , Dec 17, 2002
        View Source
        • 0 Attachment
          > Hi Brendan,
          > It would be a pleasure to help you by testing JSX2.
          Excellent!!

          > Just to show you what I
          > need: I want to serialize a class containing mainly String attributes, but
          > also some Vectors and two objects which mainly consist of Arrays of Objects
          > .... Not to complicated, I would have thought - at least it's easy to get much
          > more complicated objects.

          OK, this should work with JSX2 as it is. Why not give it a try?
          http://jsx2.com/download.html

          Code looks like this at the moment, and is used in the same way:
          JSX.ObjOut2 out = new JSX.ObjOut2(yourWriter);
          JSX.ObjIn2 in = new JSX.ObjIn2(yourReader);

          Note: the XML format is non-compatible with JSX (but you can convert your
          old XML by reading it in with JSX, then writing it out with JSX2)


          > Something which I find also strange is that on our production machine
          > everything still works (with the old JSX!), just on my developement machine
          > everything broke.
          Hmmm... there must be *something* different! Maybe list all the aspects,
          and check each one? The JSX problem may be a symptom of something
          more serious...

          > Tell me when you think I could start testing JSX2. (Because I never bothered
          > with the internals of JSX, I have no idea where writeReplace is used and what
          > else is actually needed.)

          It's just that some java objects use writeReplace and some other features. But
          the ones you mention don't use them - so no problem!

          Um... how come you got an InetAddress object in your XML, if you are only
          doing Strings and Vectors? I think the truth is that your object graph is
          *huge*,
          and you haven't realized it....

          Suggestion: scan the XML from JSX, to see what is *really* there, as a
          diagnosis tool.

          Please let me know how you go with JSX2, and we'll start from there.


          Cheers,
          Brendna
          > Stefan
          >
          >
          > Am Dienstag, 17. Dezember 2002 10:27 schrieben Sie:
          > > Hi Stefan,
          > >
          > > > > The probem was found and fixed on 12 March 2002, as a result of
          > > > > Kevin Day's comments - you must be using a very old version, because
          > > > > the Exception you reported was commented out on that date ;-)
          > > >
          > > > Hi everybody,
          > > > thanks for your help. It actually works. It's hard to keep the jars up to
          > > > date once you've got more than 40 in your project ;-)
          > > > Unfortunately I still get an OutOfMemoryError when trying to serialize my
          > > > object. I thought that could be triggered by the other error, but
          > > > unfortunately it's not. Oddly enough I never had the problem before. It
          > > > even worked with normal configuration, now I've set the heap to 256m
          > >
          > > OK... JSX now does some internal buffering to cope with some
          > > unusual cases in Java's Serialization. If you are serializing a very
          > > large graph (I'm guessing you are), then this could become a
          > > problem.
          > >
          > > JSX2's architecture is reorganized, so it doesn't have to do this
          > > buffering - unfortunately, it lacks some features that you need
          > > (such as the writeReplace we just looked at).
          > >
          > > If you would like to be a beta tester for JSX2, I can make the
          > > features you need a priority, to solve your problem. How does
          > > that sound?
          > >
          > > Note: JSX2 is *not* GPL - but it is free for academic use. Does
          > > that work for you?
          > >
          > > > > The reason why it is suddenly appearing for you is because (I bet) you
          > > > > are now serializing a class that you didn't use to in the past, which
          > > > > provoked this problem. I would guess it's because you upgraded to Java
          > > > > 1.4 (Inet4Address doesn't exist in 1.3).
          > > >
          > > > I did that actually, but ~ 2 month ago and never had the problem before
          > > > last week.
          > >
          > > hmmmm... you expressed some surprise at the InetAddress, since you don't
          > > use URLs - so possibly this is just the first time they crept into the mix?
          > >
          > > > Thanks for your work
          > >
          > > My pleasure!! I hope you will like to be a beta-tester for JSX2
          > >
          > >
          > > Cheers,
          > > Brendan
          > >
          > >
          > >
          > > To unsubscribe from this group, send an email to:
          > > JSX-ideas-unsubscribe@egroups.com
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          > --
          > Stefan Kuhn M. A.
          > MPI of Chemical Ecology, Winzerlaer Str. 10, Beutenberg Campus, 07745
          > Jena, Germany
          > Tel: +49(0)3641 571261 - Fax: +49(0)3641 571202
          >
          >
          > To unsubscribe from this group, send an email to:
          > JSX-ideas-unsubscribe@egroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
          >
        • Stefan Kuhn
          ... Well, you re right. I put in some (as I thought) minor class from some other project and this seems to be really huge. (Fortunately we re using cvs, so it
          Message 4 of 9 , Dec 18, 2002
          View Source
          • 0 Attachment
            Am Mittwoch, 18. Dezember 2002 01:46 schrieben Sie:
            >
            > Hmmm... there must be *something* different! Maybe list all the aspects,
            > and check each one? The JSX problem may be a symptom of something
            > more serious...
            >
            Well, you're right. I put in some (as I thought) minor class from some other
            project and this seems to be really huge. (Fortunately we're using cvs, so it
            was possible to trace back the different versions. I would have been lost
            without that !). Nevertheless thanks for yur help and I will jsx2 a try soon
            and report the results. Now I'm happy my app is running again !
          • Brendan Macmillan
            ... Thus: JSX the diagnostic tool! ;-) Yes, please tell me how JSX2 goes! (Although I guess you don t actually need it now...) Cheers, Brendan
            Message 5 of 9 , Dec 18, 2002
            View Source
            • 0 Attachment
              > > Hmmm... there must be *something* different! Maybe list all the aspects,
              > > and check each one? The JSX problem may be a symptom of something
              > > more serious...
              > >
              > Well, you're right. I put in some (as I thought) minor class from some other
              > project and this seems to be really huge. (Fortunately we're using cvs, so it
              > was possible to trace back the different versions. I would have been lost
              > without that !). Nevertheless thanks for yur help and I will jsx2 a try soon
              > and report the results. Now I'm happy my app is running again !

              Thus: JSX the diagnostic tool! ;-)

              Yes, please tell me how JSX2 goes! (Although I guess you don't actually
              need it now...)


              Cheers,
              Brendan
            Your message has been successfully submitted and would be delivered to recipients shortly.