• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: failed to find a snapshot for EO with Global ID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: failed to find a snapshot for EO with Global ID


  • Subject: Re: failed to find a snapshot for EO with Global ID
  • From: Calven Eggert <email@hidden>
  • Date: Tue, 12 Jun 2012 13:34:32 -0400

I'm very curious to see your findings.  One of our WO apps have had this problem for years but it happens so infrequently that the users don't seem to be bothered.  It bothers me though. argh.

  
On 2012-06-12, at 11:47 AM, <email@hidden> <email@hidden> wrote:

Ah, so it's the garbage collection that's triggering it. I should have known, given the looping worked for small values.  This is good. I can distill the failure down to a single pair of EOs using System.gc() now.  This should make it a lot easier to investigate.

    public void testNestedECs() {
     try {
     EOEditingContext ec = ERXEC.newEditingContext();
     Company c = (Company) EOUtilities.createAndInsertInstance(ec, Company.ENTITY_NAME);
     c.setName("Name");
     ec.saveChanges();
     EOEditingContext nested = ERXEC.newEditingContext(ec);
     Company nestC = c.localInstanceIn(nested);
     Employee e = (Employee) EOUtilities.createAndInsertInstance(nested, Employee.ENTITY_NAME);
     e.setFirstName("First");
     e.setLastName("Last");
     e.setManager(Boolean.FALSE);
     e.addObjectToBothSidesOfRelationshipWithKey(nestC, Employee.COMPANY_KEY);
     nested.saveChanges();
     ec.saveChanges();
     System.gc();
     c.delete();
     ec.saveChanges();
     } catch (Exception e) {
     e.printStackTrace();
     Assert.fail(e.getMessage());
     }
    }

Thanks Alexis,

Ramsey


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: failed to find a snapshot for EO with Global ID
      • From: Alexis Tual <email@hidden>
  • Prev by Date: Re: LocalDate and D2W redux
  • Next by Date: rackspace, centos and WO
  • Previous by thread: Re: failed to find a snapshot for EO with Global ID
  • Next by thread: Re: failed to find a snapshot for EO with Global ID
  • Index(es):
    • Date
    • Thread