• 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
NullPropertyException thrown, even though property allows null
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NullPropertyException thrown, even though property allows null


  • Subject: NullPropertyException thrown, even though property allows null
  • From: Hugi Þórðarson <email@hidden>
  • Date: Thu, 1 May 2008 15:38:12 +0000

Good morning folks.

I'm experiencing some weird validation behaviour.
I just generated a DB schema from an old EOModel using WOLips. When I attempt to saveChanges() into a table using some rather vanilla code, I get NullPropertyExceptions for every attribute (even though the attributes all allow nulls in both the model and the DB (except the PK, of course).

I'm using WO 5.4.1, FrontBase, and yesterday's Wonder nightly.

The code:

SWUser u = new SWUser();
someEC.insertObject( user );
someEC.saveChanges();

The error (excerpt, I get one of these for each attribute in the EOM):

<er.extensions.ERXValidationException object: <is.karlmenn.soloweb.data.SWUser pk:"null">; propertyKey: telephone; type: NullPropertyException; additionalExceptions: (  )> )>


The stack trace (below my code):

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:1055)
at com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:1381)
at er.extensions.ERXGenericRecord.validateForSave(ERXGenericRecord.java:1101)
at com.webobjects.eocontrol.EOCustomObject.validateForInsert(EOCustomObject.java:1433)
at er.extensions.ERXGenericRecord.validateForInsert(ERXGenericRecord.java:1124)
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)

Look familiar? Would anyone care to shed some light in my direction?

- h
 _______________________________________________
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: NullPropertyException thrown, even though property allows null
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: WO 5.4.2
  • Next by Date: Getting a handle to Session when wo app deployed on a J2EE container
  • Previous by thread: Re: IIS and URLScan
  • Next by thread: Re: NullPropertyException thrown, even though property allows null
  • Index(es):
    • Date
    • Thread