• 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 on non-null attribute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NullPointerException on non-null attribute


  • Subject: Re: NullPointerException on non-null attribute
  • From: Maik Musall <email@hidden>
  • Date: Wed, 14 Nov 2012 20:49:03 +0100

Am 14.11.2012 um 17:57 schrieb Jesse Tayler <email@hidden>:
> you got some backtrace on that funky action?

Happens also when a method using that attribute is directly invoked by a wod binding, in a component using autolocking.


Am 14.11.2012 um 18:21 schrieb Chuck Hill <email@hidden>:
> Also the EOModel checks are only enforced when saveChanges() runs.  So it is possible that a bug in your code is setting these to null before you try to use them.

Like I said, happens on *fetched* EOs, not on newly created ones. And as the database has a NOT NULL constraint on the column, I don't see how that attribute can end up being null in the fetched EO, except through a bug in EOF.


> On 2012-11-14, at 9:16 AM, Ramsey Gurley wrote:
>> I have seen that in apps that violate the commandments:
>>
>> http://wiki.wocommunity.org/pages/viewpage.action?pageId=1050329

I have done my best to follow those, although it's a large application so I can't rule out anything. Going through them just now, however I spotted two awakeFromInsertion() that didn't call super, although not in the classes I experienced those nasty NPE in.


>> If relationships are going missing and you are using nested ECs you may want to try
>>
>> ec.setRetainsRegisteredObjects(true)
>>
>> There's a known bug where EOs can be GCed which can result in nulls coming from required relationships. Nobody has managed to fix it in wonder yet.

I know, I already have that set in every editingcontext, and it eliminated a whole bunch of exceptions I frequently got before.


Maik


 _______________________________________________
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: NullPointerException on non-null attribute
      • From: Chuck Hill <email@hidden>
References: 
 >NullPointerException on non-null attribute (From: Maik Musall <email@hidden>)
 >Re: NullPointerException on non-null attribute (From: Ramsey Gurley <email@hidden>)
 >Re: NullPointerException on non-null attribute (From: Chuck Hill <email@hidden>)

  • Prev by Date: git question
  • Next by Date: Re: git question
  • Previous by thread: Re: NullPointerException on non-null attribute
  • Next by thread: Re: NullPointerException on non-null attribute
  • Index(es):
    • Date
    • Thread