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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to