• 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
Shared EC problems for a newbie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shared EC problems for a newbie


  • Subject: Shared EC problems for a newbie
  • From: Timmy <email@hidden>
  • Date: Thu, 23 Feb 2006 14:37:28 -0800

I've got a set of EOs that are fetched in Application by a EOSharedEditingContext. These are objects that are used to populate lists in my application. I have a component where an admin type can (hopefully) alter these objects when/if truly necessary - but it would be rare. So, they are truly "read mostly"/"write rarely" objects.

I have a method that attempts to edit one of these EOs and to accomplish that attempts to get a copy of the EO in a local editing context. In my method I have the following line:


EntityName _myLocalEO = (EntityName) EOUtilities.localInstanceOfObject(myPageContext(),entityItem());



myPageContext() returns a new local EOEditingContext that is a child of the session's defaultEditingContext (I think). It is instantiated like this:



setMyPageContext(new EOEditingContext((Session)session ().defaultEditingContext()));



The line calling EOUtilities.localInstanceOfObject() above throws a null pointer exception and I can't figure out exactly why this is happening. Below is the crash dump starting with my method (removeDosTypeFromUse()). None of the arguments I am passing into localInstanceOfObject are null.


[2006-02-23 14:11:10 PST] <WorkerThread0> java.lang.NullPointerException
at com.webobjects.eocontrol.EOEditingContext.faultForGlobalID (EOEditingContext.java:3678)
at com.webobjects.eoaccess.EOUtilities.localInstanceOfObject (EOUtilities.java:942)
at DosCodesPage.removeDosTypeFromUse(DosCodesPage.java:173)


Can anyone point me in the right direction?

Tim

_______________________________________________
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: Shared EC problems for a newbie
      • From: Art Isbell <email@hidden>
References: 
 >Out of order SQL statements? (From: "John Huss" <email@hidden>)
 >Re: Out of order SQL statements? (From: Jacky Gagnon <email@hidden>)

  • Prev by Date: Re: Out of order SQL statements?
  • Next by Date: Re: Shared EC problems for a newbie
  • Previous by thread: Re: Out of order SQL statements?
  • Next by thread: Re: Shared EC problems for a newbie
  • Index(es):
    • Date
    • Thread