• 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: Validation Exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validation Exception


  • Subject: Re: Validation Exception
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 31 Jul 2006 15:39:29 -0700

You probably have Propagate Primary Key set on this relationship. If the relationship is to-one and Propagate Primary Key is set, EOF will automatically create the object that is the destination of the relationship. You then create it again in your code, but the object that EOF created is still in the editing context, will all null values.

Chuck

On Jul 31, 2006, at 2:12 PM, Marcos Trejo Munguia wrote:

Hi list:
I've been having a problem with a validation exception that must not be happening, here is the stack trace:


com.webobjects.foundation.NSValidation$ValidationException: Product is required
at InventoryTransDetail.validateProduct(InventoryTransDetail.java:43)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.webobjects.foundation._NSReflectionUtilities._invokeMethodOnObject (_NSReflectionUtilities.java:383)
at com.webobjects.foundation.NSValidation $_MethodBinding.validateValueOnObject(NSValidation.java:615)
at com.webobjects.foundation.NSValidation $DefaultImplementation._validateValueForKey(NSValidation.java:705)
at com.webobjects.eocontrol.EOCustomObject.validateValueForKey (EOCustomObject.java:1341)
at com.webobjects.eocontrol.EOCustomObject.validateForSave (EOCustomObject.java:1411)
at com.webobjects.eocontrol.EOCustomObject.validateForInsert (EOCustomObject.java:1473)
at com.webobjects.eocontrol.EOEditingContext.validateTable (EOEditingContext.java:2188)
at com.webobjects.eocontrol.EOEditingContext.validateChangesForSave (EOEditingContext.java:2968)
at com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges (EOEditingContext.java:3222)
at com.webobjects.eocontrol.EOEditingContext.saveChanges (EOEditingContext.java:3152)
at ProductionReturn.save(ProductionReturn.java:240)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at KeyValueCodingProtectedAccessor.methodValue (KeyValueCodingProtectedAccessor.java:54)
at com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.foundation.NSKeyValueCoding $DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOComponent.valueForKey (WOComponent.java:1539)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey (NSKeyValueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath (NSKeyValueCodingAdditions.java:212)
at com.webobjects.appserver.WOComponent.valueForKeyPath (WOComponent.java:1600)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInCompone nt(WOKeyValueAssociation.java:46)
at com.webobjects.appserver._private.WOActiveImage.invokeAction (WOActiveImage.java:255)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction (WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction (WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction (WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOForm.invokeAction (WOForm.java:82)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction (WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction (WOComponentReference.java:104)
at com.webobjects.appserver._private.WOSwitchComponent.invokeAction (WOSwitchComponent.java:171)
at com.webobjects.appserver._private.WOComponentContent.invokeAction (WOComponentContent.java:31)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WOGenericContainer.invokeAction (WOGenericContainer.java:23)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WOGenericContainer.invokeAction (WOGenericContainer.java:23)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction (WOComponentReference.java:104)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java: 1166)
at com.webobjects.appserver.WOApplication.invokeAction (WOApplication.java:1375)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW ithPreparedPage(WOComponentRequestHandler.java:196)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW ithPreparedSession(WOComponentRequestHandler.java:287)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW ithPreparedApplication(WOComponentRequestHandler.java:322)
at com.webobjects.appserver._private.WOComponentRequestHandler._handleReq uest(WOComponentRequestHandler.java:358)
at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequ est(WOComponentRequestHandler.java:432)
at com.webobjects.appserver.WOApplication.dispatchRequest (WOApplication.java:1306)
at com.webobjects.appserver._private.WOWorkerThread.runOnce (WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run (WOWorkerThread.java:254)
at java.lang.Thread.run(Unknown Source)


I'm using two tables(master-detail), the master is inserted in the EC when the component is loaded, then you can add details, the details are only created and inserted in the EC if the variables holding the values pass some validations(same validations are implemented in validateXXX methods in EO class), one of the validations is the one that is being thrown in saveChanges(). I've no idea of what I'm doing wrong. If you need a copy of the code and the component please let me now. I'll appreciate any help.

Thanks in advanced!

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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: Validation Exception
      • From: Marcos Trejo Munguia <email@hidden>
References: 
 >Validation Exception (From: Marcos Trejo Munguia <email@hidden>)

  • Prev by Date: OFF TOPIC: WebObjects developer short-term contract position available for work on open source project
  • Next by Date: Re: Validation Exception
  • Previous by thread: Validation Exception
  • Next by thread: Re: Validation Exception
  • Index(es):
    • Date
    • Thread