Re: Help with updateValuesInRowDescribedByQualifier
Re: Help with updateValuesInRowDescribedByQualifier
- Subject: Re: Help with updateValuesInRowDescribedByQualifier
- From: Fabian Peters <email@hidden>
- Date: Fri, 11 Oct 2013 12:00:47 +0000
I ran into this as well. To prevent trailing spaces from getting added, you can set er.extensions.ERXGenericRecord.shouldTrimSpaces=true. I just re-created my pull-request that excludes read-only attributes from being touched: <https://github.com/wocommunity/wonder/pull/495>
You'll obviously still have to get rid of existing trailing spaces in some other way.
Fabian
Am 11.10.2013 um 11:37 schrieb Markus Ruggiero:
> A similar issue I had recently and there was another post one or two days ago pointing to the same thing: trailing spaces!
>
> My case:
> an attribute in the DB was set to be of type char. In the EOModel I had specified varchar2 for the external datatype (this is Oracle). With char you get a right space padded value back. This value was then used in a ERD2WEditToOneRelationship popup. The value got used in the generated HTML as the identifier for the selection. HTML strips all trailing spaces thus upon submitting the data the selection never matched anything and so the to-one relationship never got set. As this was an optional relationship no validate for save error or anything similar showed up. It took quite some time to first discover that there was an issue and again some/a lot more time to find out what caused it. At the end the problem came from the customer forgetting one essential step in a manual upgrade of his database.
>
> Morale of this story:
> - Always check your SQL where clauses (and the values!)
> - Always think of possible trailing spaces, not only in SQL clauses!
>
> ---markus--
>
>
> On 09.10.2013, at 20:43, Timothy Worman <email@hidden> wrote:
>
>> +1
>>
>> Turn on SQL logging and look at the exact sql that is being executed to update the row in the database. Test the “WHERE” clause in the update statement and see if it is as it should be for the row in the database.
>>
>> Tim
>> UCLA GSE&IS
>>
>> On Oct 9, 2013, at 9:30 AM, John Huss <email@hidden> wrote:
>>
>>> This is an optimistic locking error - the record was changed by another user concurrently or you have precision differences (like in NSTimestamps) that are causing the DB and memory to not match.
>>>
>>>
>>> On Wed, Oct 9, 2013 at 8:59 AM, Jesse Tayler <email@hidden> wrote:
>>>
>>> what’s this? unknown source? caught my eye...
>>>
>>> at boise.app.components.PersonnelDetail.inviteUser(Unknown Source)
>>>
>>> yes, it does seem like maybe your model is out of sync, at least you’re not getting much information back about it in the trace.
>>>
>>> did you turn on SQL debugging and generally check out that method inviteUser?
>>>
>>>
>>>
>>> On Oct 9, 2013, at 9:52 AM, Paul Yu <email@hidden> wrote:
>>>
>>>> Greetings
>>>>
>>>> I'm getting errors like this in my production system. What should I be looking for to fix these type of issues? I saw a previous post that the EOModel may be out of synch with the DB?
>>>>
>>>> Thanks in advance...
>>>>
>>>> Paul
>>>>
>>>> *** UNCAUGHT EXCEPTION ***
>>>> com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier
>>>> er.extensions.jdbc.ERXJDBCAdaptor$Channel method failed to update row in database
>>>> at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContextInformationAdded(EODatabaseContext.java:4504)
>>>> at com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseContext.java:6216)
>>>> at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:376)
>>>> at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
>>>> at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1176)
>>>> at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1099)
>>>> at boise.app.components.PersonnelDetail.inviteUser(Unknown Source)
>>>> 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:597)
>>>> 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 boise.components.BoiseComponent.valueForKeyPath(Unknown Source)
>>>> at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
>>>> at er.extensions.components.ERXComponentUtilities.valueForBinding(ERXComponentUtilities.java:539)
>>>> at er.extensions.components.ERXDynamicElement.valueForBinding(ERXDynamicElement.java:161)
>>>> at er.ajax.AjaxSubmitButton.handleRequest(AjaxSubmitButton.java:330)
>>>> at er.ajax.AjaxSubmitButton.invokeAction(AjaxSubmitButton.java:320)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
>>>> at er.extensions.components.conditionals.ERXWOConditional.invokeChildrenAction(ERXWOConditional.java:116)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
>>>> at er.extensions.components.conditionals.ERXWOConditional.invokeAction(ERXWOConditional.java:108)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
>>>> at er.extensions.components.conditionals.ERXWOConditional.invokeChildrenAction(ERXWOConditional.java:116)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
>>>> at er.extensions.components.conditionals.ERXWOConditional.invokeAction(ERXWOConditional.java:108)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
>>>> at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:218)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
>>>> at er.ajax.AjaxDynamicElement.invokeAction(AjaxDynamicElement.java:50)
>>>> at er.ajax.AjaxUpdateContainer.invokeAction(AjaxUpdateContainer.java:83)
>>>> 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 er.extensions.components.ERXComponent.invokeAction(ERXComponent.java:168)
>>>> at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:127)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
>>>> at er.extensions.components.conditionals.ERXWOConditional.invokeChildrenAction(ERXWOConditional.java:116)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
>>>> at er.extensions.components.conditionals.ERXWOConditional.invokeAction(ERXWOConditional.java:108)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
>>>> at er.ajax.AjaxDynamicElement.invokeAction(AjaxDynamicElement.java:50)
>>>> at er.ajax.AjaxUpdateContainer.invokeAction(AjaxUpdateContainer.java:83)
>>>> 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.WOComponentContent.invokeAction(WOComponentContent.java:38)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
>>>> at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
>>>> at er.ajax.AjaxDynamicElement.invokeAction(AjaxDynamicElement.java:50)
>>>> at er.ajax.AjaxUpdateContainer.invokeAction(AjaxUpdateContainer.java:83)
>>>> 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 er.extensions.components.ERXComponent.invokeAction(ERXComponent.java:168)
>>>> 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 er.extensions.components.ERXComponent.invokeAction(ERXComponent.java:168)
>>>> 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 com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:206)
>>>> at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
>>>> at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
>>>> at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
>>>> at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:445)
>>>> at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:20)
>>>> 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 boise.appserver.BoiseApplication.dispatchRequest(Unknown Source)
>>>> 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:662)
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>> _______________________________________________
>>> 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
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
_______________________________________________
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