Re: Problem with Primary Keys (I think)
> I am not sure when using child ECs. Sorry to be vague. > Hopefully someone else recalls hitting this. Looks like I'm out of luck... Is there a way to use wizards without a child editing context? > Chuck > > On 2013-02-20, at 5:06 PM, Johnny Miller wrote: > >> Hi Chuck, >> >> The only locking I'm doing is the kind I expect ERXEC to do for me. Is that >> a bad thing? >> >> Johnny >> >> On Feb 20, 2013, at 3:01 PM, Chuck Hill wrote: >> >>> Is hub_id in that statement (insert? update?) a PK or a FK for that row? >>> >>> Are you doing proper EC locking? This looks like something that could >>> happen when the ERJGroupsSynchronizer is processed while saving and the EC >>> is not locked. >>> >>> Chuck >>> >>> >>> On 2013-02-20, at 4:56 PM, Johnny Miller wrote: >>> Hi Ken, Sure - The XXXs represent information that I stripped for customer privacy. So the EO that is getting changed exists in the DB and it is not created by the app that is throwing the error. The DB is using sequences to track the primary keys. I'm not doing anything other than using the defaults. The error is it cannot set the hub_id to null which should fail validation on both the EO and the DB. Why it is trying to do that is the mystery to me. Thanks a lot, Johnny com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: null value in column "hub_id" violates not-null constraint Detail: Failing row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, XX, null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). 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 com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) 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 com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) at er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) 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 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 com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:38) >
Re: Problem with Primary Keys (I think)
I am not sure when using child ECs. Sorry to be vague. Hopefully someone else recalls hitting this. Chuck On 2013-02-20, at 5:06 PM, Johnny Miller wrote: > Hi Chuck, > > The only locking I'm doing is the kind I expect ERXEC to do for me. Is that > a bad thing? > > Johnny > > On Feb 20, 2013, at 3:01 PM, Chuck Hill wrote: > >> Is hub_id in that statement (insert? update?) a PK or a FK for that row? >> >> Are you doing proper EC locking? This looks like something that could >> happen when the ERJGroupsSynchronizer is processed while saving and the EC >> is not locked. >> >> Chuck >> >> >> On 2013-02-20, at 4:56 PM, Johnny Miller wrote: >> >>> Hi Ken, >>> >>> Sure - The XXXs represent information that I stripped for customer privacy. >>> >>> So the EO that is getting changed exists in the DB and it is not created by >>> the app that is throwing the error. The DB is using sequences to track the >>> primary keys. I'm not doing anything other than using the defaults. The >>> error is it cannot set the hub_id to null which should fail validation on >>> both the EO and the DB. Why it is trying to do that is the mystery to me. >>> >>> Thanks a lot, >>> >>> Johnny >>> >>> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression >>> failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: >>> null value in column "hub_id" violates not-null constraint Detail: Failing >>> row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, >>> X, XX, null, null, null, 0, null, 7171, 0, 2013-02-20 >>> 06:00:45.343, 2, 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, >>> 0.00, null, null, 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 >>> 11:05:00, 0, 1, null). 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 >>> com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) >>> 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 >>> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) >>> at >>> com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) >>> at >>> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) >>> 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 >>> 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 >>> 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) >>> a
Re: Problem with Primary Keys (I think)
Do you think I should try locking the child editing context through the wizard and only unlock it after the save changes is made on the parent? On Feb 20, 2013, at 3:50 PM, Chuck Hill wrote: > Should be able to keep it locked. > > Hmmm, that child EC might be contributing to this. I recall a discussion of > some problems. The details are not coming to me. > > > > Chuck > > On 2013-02-20, at 5:46 PM, Johnny Miller wrote: > >> OK. So on this particular type of EO it always goes through a wizard where >> I use a parent & child editing context. >> >> Do I need to unlock/lock before I save changes on every step? >> >> On Feb 20, 2013, at 3:08 PM, Chuck Hill wrote: >> >>> >>> On 2013-02-20, at 5:05 PM, Johnny Miller wrote: >>> I can't figure out why it's talking to this EO at all. It should be creating a new EO not modifying an existing one. >>> >>> That is EXACTLY what happens when things are not locked properly. The EC >>> processes a notification and basically goes insane, losing track of which >>> objects are inserted, updated, etc. >>> >>> >>> Chuck >>> >>> On Feb 20, 2013, at 3:00 PM, Ken Anderson wrote: > What is the code doing to the object that's being modified? > > On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: > >> Hi Ken, >> >> Sure - The XXXs represent information that I stripped for customer >> privacy. >> >> So the EO that is getting changed exists in the DB and it is not created >> by the app that is throwing the error. The DB is using sequences to >> track the primary keys. I'm not doing anything other than using the >> defaults. The error is it cannot set the hub_id to null which should >> fail validation on both the EO and the DB. Why it is trying to do that >> is the mystery to me. >> >> Thanks a lot, >> >> Johnny >> >> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression >> failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: >> null value in column "hub_id" violates not-null constraint Detail: >> Failing row contains (null, 0, 0, 852918, 2013-02-20 >> 06:00:45.343-10, X, XX, null, null, null, 0, null, 7171, >> 0, 2013-02-20 06:00:45.343, 2, 2013-04-12 11:05:00-10, 2, 6, 0, null, >> 149, 9, X, 0.00, null, null, 55.00, 11.00, null, 2, 0, 0, 0, 0, >> XX, 2013-04-12 11:05:00, 0, 1, null). 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 >> com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) >> 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 >> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) >> at >> com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) >> at >> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) >> 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.i
Re: Problem with Primary Keys (I think)
Should be able to keep it locked. Hmmm, that child EC might be contributing to this. I recall a discussion of some problems. The details are not coming to me. Chuck On 2013-02-20, at 5:46 PM, Johnny Miller wrote: > OK. So on this particular type of EO it always goes through a wizard where I > use a parent & child editing context. > > Do I need to unlock/lock before I save changes on every step? > > On Feb 20, 2013, at 3:08 PM, Chuck Hill wrote: > >> >> On 2013-02-20, at 5:05 PM, Johnny Miller wrote: >> >>> I can't figure out why it's talking to this EO at all. It should be >>> creating a new EO not modifying an existing one. >> >> That is EXACTLY what happens when things are not locked properly. The EC >> processes a notification and basically goes insane, losing track of which >> objects are inserted, updated, etc. >> >> >> Chuck >> >> >>> >>> On Feb 20, 2013, at 3:00 PM, Ken Anderson wrote: >>> What is the code doing to the object that's being modified? On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: > Hi Ken, > > Sure - The XXXs represent information that I stripped for customer > privacy. > > So the EO that is getting changed exists in the DB and it is not created > by the app that is throwing the error. The DB is using sequences to > track the primary keys. I'm not doing anything other than using the > defaults. The error is it cannot set the hub_id to null which should > fail validation on both the EO and the DB. Why it is trying to do that > is the mystery to me. > > Thanks a lot, > > Johnny > > com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression > failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: > null value in column "hub_id" violates not-null constraint Detail: > Failing row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, > X, XX, null, null, null, 0, null, 7171, 0, 2013-02-20 > 06:00:45.343, 2, 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, > X, 0.00, null, null, 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, > 2013-04-12 11:05:00, 0, 1, null). 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 > com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) > 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 > com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) > at > com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) > at > er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) > 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 > er.extensions.components._private.ERXWOFo
Re: Problem with Primary Keys (I think)
OK. So on this particular type of EO it always goes through a wizard where I use a parent & child editing context. Do I need to unlock/lock before I save changes on every step? On Feb 20, 2013, at 3:08 PM, Chuck Hill wrote: > > On 2013-02-20, at 5:05 PM, Johnny Miller wrote: > >> I can't figure out why it's talking to this EO at all. It should be >> creating a new EO not modifying an existing one. > > That is EXACTLY what happens when things are not locked properly. The EC > processes a notification and basically goes insane, losing track of which > objects are inserted, updated, etc. > > > Chuck > > >> >> On Feb 20, 2013, at 3:00 PM, Ken Anderson wrote: >> >>> What is the code doing to the object that's being modified? >>> >>> On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: >>> Hi Ken, Sure - The XXXs represent information that I stripped for customer privacy. So the EO that is getting changed exists in the DB and it is not created by the app that is throwing the error. The DB is using sequences to track the primary keys. I'm not doing anything other than using the defaults. The error is it cannot set the hub_id to null which should fail validation on both the EO and the DB. Why it is trying to do that is the mystery to me. Thanks a lot, Johnny com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: null value in column "hub_id" violates not-null constraint Detail: Failing row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, XX, null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). 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 com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) 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 com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) at er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) 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 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 com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComp
Re: Problem with Primary Keys (I think)
On 2013-02-20, at 5:05 PM, Johnny Miller wrote: > I can't figure out why it's talking to this EO at all. It should be creating > a new EO not modifying an existing one. That is EXACTLY what happens when things are not locked properly. The EC processes a notification and basically goes insane, losing track of which objects are inserted, updated, etc. Chuck > > On Feb 20, 2013, at 3:00 PM, Ken Anderson wrote: > >> What is the code doing to the object that's being modified? >> >> On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: >> >>> Hi Ken, >>> >>> Sure - The XXXs represent information that I stripped for customer privacy. >>> >>> So the EO that is getting changed exists in the DB and it is not created by >>> the app that is throwing the error. The DB is using sequences to track the >>> primary keys. I'm not doing anything other than using the defaults. The >>> error is it cannot set the hub_id to null which should fail validation on >>> both the EO and the DB. Why it is trying to do that is the mystery to me. >>> >>> Thanks a lot, >>> >>> Johnny >>> >>> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression >>> failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: >>> null value in column "hub_id" violates not-null constraint Detail: Failing >>> row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, >>> X, XX, null, null, null, 0, null, 7171, 0, 2013-02-20 >>> 06:00:45.343, 2, 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, >>> 0.00, null, null, 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 >>> 11:05:00, 0, 1, null). 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 >>> com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) >>> 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 >>> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) >>> at >>> com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) >>> at >>> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) >>> 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 >>> 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 >>> 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 >>> com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079) at >>> er.extensions.components.E
Re: Problem with Primary Keys (I think)
Sorry I forgot to answer first question. It's a foreign key. On Feb 20, 2013, at 3:01 PM, Chuck Hill wrote: > Is hub_id in that statement (insert? update?) a PK or a FK for that row? > > Are you doing proper EC locking? This looks like something that could happen > when the ERJGroupsSynchronizer is processed while saving and the EC is not > locked. > > Chuck > > > On 2013-02-20, at 4:56 PM, Johnny Miller wrote: > >> Hi Ken, >> >> Sure - The XXXs represent information that I stripped for customer privacy. >> >> So the EO that is getting changed exists in the DB and it is not created by >> the app that is throwing the error. The DB is using sequences to track the >> primary keys. I'm not doing anything other than using the defaults. The >> error is it cannot set the hub_id to null which should fail validation on >> both the EO and the DB. Why it is trying to do that is the mystery to me. >> >> Thanks a lot, >> >> Johnny >> >> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression >> failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: >> null value in column "hub_id" violates not-null constraint Detail: Failing >> row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, >> XX, null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, >> 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, >> 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). >> 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 >> com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) >> 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 >> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) >> at >> com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) >> at >> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) >> 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 >> 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 >> 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 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.WODy
Re: Problem with Primary Keys (I think)
Hi Chuck, The only locking I'm doing is the kind I expect ERXEC to do for me. Is that a bad thing? Johnny On Feb 20, 2013, at 3:01 PM, Chuck Hill wrote: > Is hub_id in that statement (insert? update?) a PK or a FK for that row? > > Are you doing proper EC locking? This looks like something that could happen > when the ERJGroupsSynchronizer is processed while saving and the EC is not > locked. > > Chuck > > > On 2013-02-20, at 4:56 PM, Johnny Miller wrote: > >> Hi Ken, >> >> Sure - The XXXs represent information that I stripped for customer privacy. >> >> So the EO that is getting changed exists in the DB and it is not created by >> the app that is throwing the error. The DB is using sequences to track the >> primary keys. I'm not doing anything other than using the defaults. The >> error is it cannot set the hub_id to null which should fail validation on >> both the EO and the DB. Why it is trying to do that is the mystery to me. >> >> Thanks a lot, >> >> Johnny >> >> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression >> failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: >> null value in column "hub_id" violates not-null constraint Detail: Failing >> row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, >> XX, null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, >> 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, >> 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). >> 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 >> com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) >> 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 >> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) >> at >> com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) >> at >> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) >> 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 >> 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 >> 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 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) >
Re: Problem with Primary Keys (I think)
I can't figure out why it's talking to this EO at all. It should be creating a new EO not modifying an existing one. On Feb 20, 2013, at 3:00 PM, Ken Anderson wrote: > What is the code doing to the object that's being modified? > > On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: > >> Hi Ken, >> >> Sure - The XXXs represent information that I stripped for customer privacy. >> >> So the EO that is getting changed exists in the DB and it is not created by >> the app that is throwing the error. The DB is using sequences to track the >> primary keys. I'm not doing anything other than using the defaults. The >> error is it cannot set the hub_id to null which should fail validation on >> both the EO and the DB. Why it is trying to do that is the mystery to me. >> >> Thanks a lot, >> >> Johnny >> >> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression >> failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: >> null value in column "hub_id" violates not-null constraint Detail: Failing >> row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, >> XX, null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, >> 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, >> 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). >> 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 >> com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) >> 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 >> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) >> at >> com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) >> at >> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) >> 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 >> 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 >> 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 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(WODynami
Re: Problem with Primary Keys (I think)
Is hub_id in that statement (insert? update?) a PK or a FK for that row? Are you doing proper EC locking? This looks like something that could happen when the ERJGroupsSynchronizer is processed while saving and the EC is not locked. Chuck On 2013-02-20, at 4:56 PM, Johnny Miller wrote: > Hi Ken, > > Sure - The XXXs represent information that I stripped for customer privacy. > > So the EO that is getting changed exists in the DB and it is not created by > the app that is throwing the error. The DB is using sequences to track the > primary keys. I'm not doing anything other than using the defaults. The > error is it cannot set the hub_id to null which should fail validation on > both the EO and the DB. Why it is trying to do that is the mystery to me. > > Thanks a lot, > > Johnny > > com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: > : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: null value > in column "hub_id" violates not-null constraint Detail: Failing row contains > (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, XX, > null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, 2013-04-12 > 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, 55.00, > 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). 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 > com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) > 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 > com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) > at > com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) > at > er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) > 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 > 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 > 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 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
Re: Problem with Primary Keys (I think)
What is the code doing to the object that's being modified? On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: > Hi Ken, > > Sure - The XXXs represent information that I stripped for customer privacy. > > So the EO that is getting changed exists in the DB and it is not created by > the app that is throwing the error. The DB is using sequences to track the > primary keys. I'm not doing anything other than using the defaults. The > error is it cannot set the hub_id to null which should fail validation on > both the EO and the DB. Why it is trying to do that is the mystery to me. > > Thanks a lot, > > Johnny > > com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: > : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: null value > in column "hub_id" violates not-null constraint Detail: Failing row contains > (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, XX, > null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, 2013-04-12 > 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, 55.00, > 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). 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 > com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) > 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 > com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) > at > com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) > at > er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) > 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 > 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 > 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 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.webobj
Re: Problem with Primary Keys (I think)
Hi Ken, Sure - The XXXs represent information that I stripped for customer privacy. So the EO that is getting changed exists in the DB and it is not created by the app that is throwing the error. The DB is using sequences to track the primary keys. I'm not doing anything other than using the defaults. The error is it cannot set the hub_id to null which should fail validation on both the EO and the DB. Why it is trying to do that is the mystery to me. Thanks a lot, Johnny com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: : Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: null value in column "hub_id" violates not-null constraint Detail: Failing row contains (null, 0, 0, 852918, 2013-02-20 06:00:45.343-10, X, XX, null, null, null, 0, null, 7171, 0, 2013-02-20 06:00:45.343, 2, 2013-04-12 11:05:00-10, 2, 6, 0, null, 149, 9, X, 0.00, null, null, 55.00, 11.00, null, 2, 0, 0, 0, 0, XX, 2013-04-12 11:05:00, 0, 1, null). 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 com.hawaiiexecutivetransportation.components.pages.ReservationPaymentPage.processPayment(ReservationPaymentPage.java:155) 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 com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70) at er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203) 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 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 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 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:117) at er.extensions.appserver.ERXApplication.invokeAction(ERXApplication.java:2029) at er.extensions.appserver.ERXComponentRequestH
Re: Problem with Primary Keys (I think)
Johnny, Could you post the details of the exception? Also, how are you getting your primary keys? You really shouldn't have a problem assuming you're using a table for primary keys. Ken On Feb 20, 2013, at 5:43 PM, Johnny Miller wrote: > Hi, > > OK. This is a hard one to explain. > > Basically, I have a site that has a back and a front end. Separate apps > running on the same host. I'm using ERJGroupsSynchronizer. The host is AWS > with Amazon Linux AMI. The database is PostgreSQL 9.2. > > Both ends create objects. For some reason every few days or so I get an > EOGeneralAdapterException when the front end goes to insert an object. It's > trying to change some properties on an EO of the same type created at the > same time in the back end. I'm thinking that is happening because somehow > they are sharing the same primary key. > > If that is right, is there a way to delay the assigning of the key until the > object gets inserted? > > Aloha, > Mr. Johnny Miller > Web Development Manager > Kahalawai Media Company > Lahaina, HI 96761 > tel: (808) 661-7962 | mobile: (808) 283-0791 > website | e-mail > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/kenlists%40anderhome.com > > This email sent to kenli...@anderhome.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com