• 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: NullPointerException only after first call to batchFetchRelationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NullPointerException only after first call to batchFetchRelationship


  • Subject: Re: NullPointerException only after first call to batchFetchRelationship
  • From: Kaj Hejer <email@hidden>
  • Date: Sun, 14 Dec 2003 18:08:10 +0100

At 08:57 -0400 17-08-03, Lenny Marks wrote:
I have a direct action to render all information for a specified
'Manuscript' in our database. The rendering of this page traces deep into
the manuscript's relationships and was slow so I was attempting to use
EODatabaseContext.batchFetchRelationship to limit the hits to the
database. I added a method batchFetchManuscriptEvents(the root of the deep
relationships) to my Manuscript EOEnterpriseObject class. I was hoping
that the application could call this in anticipation of its particular
display needs. The method would batchFetch all the relationships so that
by the time the WOComponent was generating its response, all the
relationships would have already been faulted. This actually worked, but
only the first time the method is invoked on a Manuscript instance within
a single EOF stack. The first time I access the direct action for a
manuscript, it works, but if I hit reload I get the exception below.

Any clues would be greatly appreciated!

-Lenny Marks

<ManView>[2003-08-17 07:49:16 EDT] <Thread-6>
java.lang.NullPointerException
        at
com.webobjects.eocontrol._EOMutableKnownKeyDictionary.<init>(_EOMutableKnownKeyDictionary.java:90)
        at
com.webobjects.eoaccess.EORelationship._foreignKeyForSourceRow(EORelationship.java:1094)




Hi!

I now saw the same exception when using prefetching.

The stacktrace and the method where I get this exception can be found at http://folk.uio.no/kajh/tmp/wo20031214.txt

Has anybody else here seen this?

The ec I use here is a childEC of session.defaulteditingContext and this childEC has been locked.

I have only managed to reproduced this issue two times while testing this application for about an hour, so it seems that it does not appear so very often.


-Kaj :) _______________________________________________ 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: NullPointerException only after first call to batchFetchRelationship
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Auto-Reply to: webobjects-dev digest, Vol 1 #6
  • Next by Date: German Characters pasted from PDF
  • Previous by thread: Re: eomodeler with mysql
  • Next by thread: Re: NullPointerException only after first call to batchFetchRelationship
  • Index(es):
    • Date
    • Thread