• 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: Strange EOF exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange EOF exception


  • Subject: Re: Strange EOF exception
  • From: Ulrich Köster <email@hidden>
  • Date: Thu, 22 Jan 2004 17:34:44 +0100

Hi,

may be I'm totally wrong but shouldn't  it be

eo.setVal(EOKeyValueCoding.NullValue);

instead of

eo.setVal(null);

Ulrich

Am 22.01.2004 um 17:23 schrieb Pierre Bernard:

> Hi!
>
> My colleague's sample code reads like this:
>
>     private void testEditingContext() {
>         boolean isLocking = true;
>
>         EOEditingContext ec = new EOEditingContext();
>         try {
>             if (isLocking)
>                 ec.lock();
>             NSArray allEOs = EOUtilities.objectsForEntityNamed(ec,
> "TestEntity");
>             NSLog.out.appendln("fetched " + allEOs.count() + "
> objects");
>             TestEntity eo = (TestEntity) allEOs.lastObject();
>             NSLog.out.appendln("eo = " + eo);
>
>             eo.setVal(null);
>
>             try {
>                 ec.saveChanges();
>             } catch (NSValidation.ValidationException ve) {
>                 ve.printStackTrace();
>             }
>
>             NSLog.out.appendln("ec.hasChanges ? " + ec.hasChanges());
>             NSLog.out.appendln("ec.updatedObjects = " +
> ec.updatedObjects());
>
>             ec.deleteObject(eo);
>             ec.saveChanges();
>         } catch (Exception e) {
>             e.printStackTrace();
>         } finally {
>             if (isLocking)
>                 ec.unlock();
>         }
>     }
>
> TestEntity has a validateForSave() method which always throws a
> validation exception. Thus the first save attempt will always fail.
>
> We unfortunately have no longer have WO 5.2.1 installed anywhere.
>
> I guess the problem is with some clean-up happening or not as the
> first attempt at saveChanges() fails. Looks like some field is reset
> to null.If we are unlucky it might even be related to garbage
> collection. That would make the problem only randomly reproducible.
>
> I have no workaround, but will be glad to hear about any.
>
> Pierre.
>
> -----Original Message-----
> From: Ben Ketteridge [mailto:email@hidden]
> Sent: Thursday, January 22, 2004 5:11 PM
> To: Pierre Bernard
> Cc: WebObjects Developers; Apple WO Dev
> Subject: Re: Strange EOF exception
>
>
> Pierre Bernard wrote:
>> I was just about to write a bug report about this. Well, I will within
>> the next few days...
>>
>> I am seeing this if after saving an object failed over a validation
>> error
>> I attempt to delete the offinding object. A colleage has written a
>> test > case I still have to look into. It appears that the bug cannot
>> be
>> reproduced on a WebObjects 5.1.3 machine.
>>
>> I'd be glad to have more information about this. Let's hope someone at
>> Apple will feel this is worth a quick fix. Such unexpected crashes
>> are no
>> no good ... at all.
>
> Can you reproduce it under WO5.2.1?
>
> The operation where we see this error is certainly one where EOs are
> being deleted, though I'm not sure what validation our delete might be
> failing!
>
> Could it be contention? (I doubt it myself)
>
> Are you aware of any kind of workaround?
>
> --
> Kind Regards
> Ben.
>
> Dr Ben Ketteridge
> email@hidden
>
> Team Leader,
> ProAct International,
> PO Box 100, Denbigh, UK.
> Tel: 01745 817161 ext. 322
>
>
>
> **********************************************************************
> This email and any files transmitted with it are intended solely for
> the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify the sender
> of this message. (email@hidden)
> This email message has been checked for the presence of computer
> viruses; however this protection does not ensure this message is
> virus free.
> Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
> **********************************************************************
>
> _______________________________________________
> WebObjects-dev mailing list
> email@hidden
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Strange EOF exception
      • From: Jonathan Rochkind <email@hidden>
References: 
 >RE: Strange EOF exception (From: "Pierre Bernard" <email@hidden>)

  • Prev by Date: RE: Strange EOF exception
  • Next by Date: Re: automated insert to database from email
  • Previous by thread: RE: Strange EOF exception
  • Next by thread: Re: Strange EOF exception
  • Index(es):
    • Date
    • Thread