• 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
Null property exceptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Null property exceptions


  • Subject: Null property exceptions
  • From: Jeff Schmitz <email@hidden>
  • Date: Sun, 01 Jun 2008 21:35:47 -0500

Hello,
   I can't get past NullPropertyException's when I try to save changes to my editing context.  I have an object, pool, that I add an entry to with the Entry.createEntry operation.  Then, in turn, I add an EntryScore obejct to the entry object.  Note that the entryScore relationship in Entry (the one causing the problems) is set to "propagate primary key".  I have tried making it both mandatory and optional with the same results.  Any ideas what may be causing this?

Here's the basic code:

   EOQualifier poolQual = Pool.NAME.eq(name);
   pool = Pool.fetchRequiredPool(ec, poolQual);
   entry = Entry.createEntry(ec, "DEFAULT", "pw", true, false, new Integer(0), "", false, false, false, new Integer(0), pool, user);
   EntryScore es = EntryScore.createEntryScore(ec, 0, 0, 0, 0, 0, 0);
   entry.setEntryScore(es);
   ec.saveChanges();

exception (on the SaveChanges line):

Jun 01 21:19:54 netBrackets[64375] (ERXNSLogLog4jBridge.java:41) WARN  NSLog  - <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numSecs; type: NullPropertyException; additionalExceptions: ( <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numThirds; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numWins; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: place; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: points; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: potential; type: NullPropertyException; additionalExceptions: (  )> )>
[2008-6-2 3:19:54 CDT] <WorkerThread0> <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numSecs; type: NullPropertyException; additionalExceptions: ( <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numThirds; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numWins; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: place; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: points; type: NullPropertyException; additionalExceptions: (  )>,
<er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: potential; type: NullPropertyException; additionalExceptions: (  )> )>
at com.webobjects.eoaccess.EOAttribute.validateValue(EOAttribute.java:2541)
at com.webobjects.eoaccess.EOEntityClassDescription.validateValueForKey(EOEntityClassDescription.java:452)
at er.extensions.ERXEntityClassDescription.validateValueForKey(ERXEntityClassDescription.java:796)
at com.webobjects.eocontrol.EOCustomObject.validateValueForKey(EOCustomObject.java:1311)
at er.extensions.ERXGenericRecord.validateValueForKey(ERXGenericRecord.java:1063)
at com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:1381)
at er.extensions.ERXGenericRecord.validateForSave(ERXGenericRecord.java:1109)
at com.webobjects.eocontrol.EOCustomObject.validateForInsert(EOCustomObject.java:1433)
at er.extensions.ERXGenericRecord.validateForInsert(ERXGenericRecord.java:1132)
at com.webobjects.eocontrol.EOEditingContext.validateTable(EOEditingContext.java:2265)
at com.webobjects.eocontrol.EOEditingContext.validateChangesForSave(EOEditingContext.java:2991)
at com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges(EOEditingContext.java:3233)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3163)
at er.extensions.ERXEC._saveChanges(ERXEC.java:937)
at er.extensions.ERXEC.saveChanges(ERXEC.java:860)

 _______________________________________________
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: Null property exceptions
      • From: Johann Werner <email@hidden>
  • Prev by Date: Re: enabling wonder in eclipse -- missing something stupid
  • Next by Date: Re: enabling wonder in eclipse -- missing something stupid
  • Previous by thread: Re: enabling wonder in eclipse -- missing something stupid
  • Next by thread: Re: Null property exceptions
  • Index(es):
    • Date
    • Thread