at mp.gen.Utils.getStackTraceAsString(Utils.java:2819)
at mp.eo.Transaction.takeStoredValueForKey(Transaction.java:1920)
at com.webobjects.eocontrol.EOCustomObject.updateFromSnapshot(EOCustomObject.java:581)
at er.extensions.eof.ERXGenericRecord.updateFromSnapshot(ERXGenericRecord.java:1267)
at com.webobjects.eocontrol.EOEditingContext._undoUpdate(EOEditingContext.java:1629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at com.webobjects.foundation.NSSelector.invoke(NSSelector.java:358)
at com.webobjects.foundation.NSSelector._safeInvokeSelector(NSSelector.java:110)
at com.webobjects.foundation.NSUndoManager$_NSUndoLightInvocation.invoke(NSUndoManager.java:1002)
at com.webobjects.foundation.NSUndoManager$_NSUndoStack.popAndInvoke(NSUndoManager.java:1280)
at com.webobjects.foundation.NSUndoManager.undoNestedGroup(NSUndoManager.java:733)
at com.webobjects.foundation.NSUndoManager.undo(NSUndoManager.java:693)
at com.webobjects.eodistribution.EODistributionContext.responseToClientMessage(EODistributionContext.java:627)
at com.webobjects.eodistribution.WOJavaClientApplet.handleClientRequest(WOJavaClientApplet.java:978)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636)
at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
at com.webobjects.appserver._private.WOGenericElement.invokeAction(WOGenericElement.java:121)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WOGenericContainer.invokeAction(WOGenericContainer.java:29)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at com.webobjects.appserver._private.WOConditional.invokeAction(WOConditional.java:86)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079)
at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:127)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1357)
at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1745)
at er.extensions.appserver.ajax.ERXAjaxApplication.invokeAction(ERXAjaxApplication.java:119)
at er.extensions.appserver.ERXApplication.invokeAction(ERXApplication.java:1988)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268)
at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302)
at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:378)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2109)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2074)
at mpServer.Application.dispatchRequest(Application.java:168)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:701)
On 12 Sep 2014, at 09:18, John Pollard <
email@hidden> wrote:
Hmm, hairy palms, not sure I want that, but thanks for this anyway. The related attribute is a to-one relationship, does that mean it is a FK attribute? It is the to-one relationship that becomes null against my will and I need to find out where/why.
I have now cobbled some code up in takeStoredValueForKey() which avoids the recursion when checking the existing value using storedValueForKey() and
ignores the (temp) null value caused by clearProperties() when the EO is invalidated. Hence I believe I now have the code to scream if my property is set to null from a pre-existing value and I should get an email + stack trace to report the exciting news.
These intermittents are about once every two months so will have to wait.
You are going to grow hair on your palms doing this but…
willRead();
Object value = __dictionary().valueForKey(“your attribute”);
Should, I think, do what you want. Of course, it is package protected so you will need to use reflection to get access. And the result may be null if the object is still a fault.
Is this an FK or PK by chance?
Chuck
On 2014-09-11, 12:22 PM, "John Pollard" wrote:
Apologies, I meant takeStoredValueForKey(). Within there, how can I safely see what the value currently is when when this method is called, before I invoke super. takeStoredValueForKey() to take on the new value?
John
The order of calls is:
takeValueForKey -> setXXX -> takeStoredValueForKey
All of these maybe skipped except for takeStoredValueForKey, so that is the only one you should override to see what is getting saved.