• 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: Multiple operations on a object in two different sessions.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple operations on a object in two different sessions.


  • Subject: Re: Multiple operations on a object in two different sessions.
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 5 Jul 2005 18:14:25 -0700

If this can happen, you need to check that object.editingContext() ! = null, or listen for the notifications posted by EOObjectStore and handle in some appropriate manner.

Chuck


On Jul 4, 2005, at 5:59 AM, sri wrote:

Hi All,

Please suggest me how to handle the following situation.

Say I have an Object which is being operated on , in two different sessions (having the same object store coordinator )at the same time ,the user can either modify or delete it , say in the first window (session ) the user has deleted the object ( i.e .., the object will be removed from the editing context and the database ) .

But please note that the object is still available (although the relationships will be made null ) in the second window , now after the deletion of the object is completed when the user tries to save the object in the second session, its throwing the foolowing exception



One of the following errors may have occurred:
1. The parent does not have a method named 'save'.
2. An error occurred while executing the method 'save'.
Please, read the following logs carefully and advise.
java.lang.NullPointerException
[2005-07-04 18:23:07 ] <WorkerThread15> com.webobjects.foundation.NSForwardException for java.lang.NullPointerException
at com.webobjects.eocontrol.EOCustomObject.willReadRelationship (EOCustomObject.java:1293)
at com.webobjects.eocontrol._EOMutableKnownKeyDictionary $Initializer$_LazyGenericRecordBinding.valueInObject (_EOMutableKnownKeyDictionary.java:560)
at com.webobjects.eocontrol.EOCustomObject.storedValueForKey (EOCustomObject.java:1736)
at com.effigent.reusables.PEGenericRecord.storedValueForKey (PEGenericRecord.java:133)
at com.powereasy.erp.accountspayable.enterpriseclasses._PeVendor.peTaxGro up(_PeVendor.java:254)
at sun.reflect.GeneratedMethodAccessor278.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.webobjects.foundation.NSKeyValueCoding$1.methodValue (NSKeyValueCoding.java:684)
at com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.eocontrol.EOCustomObject.valueForKey (EOCustomObject.java:1559)
at com.webobjects.eocontrol.EOCustomObject.eoDescription (EOCustomObject.java:774)
at com.webobjects.eocontrol.EOCustomObject.toString (EOCustomObject.java:239)
at java.lang.String.valueOf(String.java:2177)
at java.lang.StringBuffer.append(StringBuffer.java:371)
at VendorDetails.save(VendorDetails.java:1838)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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.appserver.WOComponent.performParentAction (WOComponent.java:1101)
at com.effigent.reusables.queryandlist.PageTitleAndButtonComp.saveAction( PageTitleAndButtonComp.java:661)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.webobjects.foundation.NSKeyValueCoding$1.methodValue (NSKeyValueCoding.java:684)
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.WOImageButton.invokeAction (WOImageButton.java:239)
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.WODynamicGroup.invokeChildrenAction( WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
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.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.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._private.WOComponentContent.invokeAction (WOComponentContent.java:31)
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 er.extensions.ERXApplication.invokeAction(ERXApplication.java:595)
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 er.extensions.ERXApplication.dispatchRequest (ERXApplication.java:639)
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(Thread.java:536)


535396 [WorkerThread15] ERROR root - Exception : com.webobjects.foundation.NSForwardException [java.lang.NullPointerException] null: <com.effigent.reusables.queryandlist.PageTitleAndButtonComp name: com.effigent.reusables.queryandlist.PageTitleAndButtonComp subcomponents: {0.47.0.0.1.1.8 = <com.effigent.projectadjuncts.EffigErrorComponent name: com.effigent.projectadjuncts.EffigErrorComponent subcomponents: null >; 0.47.0.0.1.1.6.15 = <com.effigent.reusables.queryandlist.EntityNavigationComp name: com.effigent.reusables.queryandlist.EntityNavigationComp subcomponents: null >; } >

OR sometimes

1651236 [WorkerThread16] WARN NSLog -
<com.webobjects.appserver._private.WOComponentRequestHandler>: Exception
occurred while handling request:
java.lang.IllegalStateException: Attempt to access an EO that has either
not been inserted into any EOEditingContext or its EOEditingContext has
already been disposed
[2005-07-04 18:21:33 ] <WorkerThread16> java.lang.IllegalStateException:
Attempt to access an EO that has either not been inserted into any
EOEditingContext or its EOEditingContext has already been disposed
at
com.webobjects.eocontrol.EOCustomObject.willRead (EOCustomObject.java:1175)
at
com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer $_GenericRecordBinding.valueInObject (_EOMutableKnownKeyDictionary.java:519)
at
com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer $_LazyGenericRecordBinding.valueInObject (_EOMutableKnownKeyDictionary.java:559)
at
com.webobjects.eocontrol.EOCustomObject.storedValueForKey (EOCustomObject.java:1736)
at com.effigent.reusables.PEGenericRecord.storedValueForKey (Unknown
Source)
at
com.powereasy.erp.accountspayable.enterpriseclasses._PeVendor.peVendor Addresses(Unknown
Source)
at VendorInfo.addressTypes(Unknown Source)
at VendorInfo.shouldShowAddAddress(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1286.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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.WOAssociation.booleanValueInComponent (WOAssociation.java:278)
at
com.webobjects.appserver._private.WOConditional.takeValuesFromRequest( WOConditional.java:33)
at
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFro mRequest(WODynamicGroup.java:81)
at
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest (WODynamicGroup.java:89)
at
com.webobjects.appserver.WOComponent.takeValuesFromRequest (WOComponent.java:914)
at
com.effigent.projectadjuncts.EffigentWOComponent.takeValuesFromRequest (Unknown
Source)
at VendorInfo.takeValuesFromRequest(Unknown Source)
at
com.webobjects.appserver._private.WOComponentReference.takeValuesFromR equest(WOComponentReference.java:97)
at
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFro mRequest(WODynamicGroup.java:81)
at
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest (WODynamicGroup.java:89)
at
com.webobjects.appserver._private.WOComponentContent.takeValuesFromReq uest(WOComponentContent.java:20)
at
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFro mRequest(WODynamicGroup.java:81)
at
com.webobjects.appserver._private.WOGenericContainer.takeValuesFromReq uest(WOGenericContainer.java:17)
at
com.webobjects.appserver.WOComponent.takeValuesFromRequest (WOComponent.java:914)
at
com.effigent.projectadjuncts.EffigentWOComponent.takeValuesFromRequest (Unknown
Source)




I will be thankful if any one can provide a generic solution to the above.

Thanks & Regards,
Sri
_______________________________________________
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

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development 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
References: 
 >Multiple operations on a object in two different sessions. (From: "sri" <email@hidden>)

  • Prev by Date: Re: Automatically create record in a to-one relationship
  • Next by Date: Re: OT: what do you use for task/ticket management?
  • Previous by thread: Multiple operations on a object in two different sessions.
  • Next by thread: Click - alternative to WO?
  • Index(es):
    • Date
    • Thread