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

Re: NullPropertyException thrown, even though property allows null


  • Subject: Re: NullPropertyException thrown, even though property allows null
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 1 May 2008 11:05:45 -0700

My only guess is that the model got corrupted or something even stranger happened. :-) Take a look in .plist file.


Chuck

On May 1, 2008, at 8:38 AM, Hugi Þórðarson wrote:

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

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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: Hugi Þórðarson <email@hidden>
References: 
 >NullPropertyException thrown, even though property allows null (From: Hugi Þórðarson <email@hidden>)

  • Prev by Date: Problems building with AppleScriptEngine.jar after JDK 1.6 Install
  • Next by Date: Unable to locate "JavaWebObjects" bundle
  • Previous by thread: NullPropertyException thrown, even though property allows null
  • Next by thread: Re: NullPropertyException thrown, even though property allows null
  • Index(es):
    • Date
    • Thread