Re: Update & Delete of an Enterprise Object causes EOEditingContext.saveChanges() to Exception
Re: Update & Delete of an Enterprise Object causes EOEditingContext.saveChanges() to Exception
- Subject: Re: Update & Delete of an Enterprise Object causes EOEditingContext.saveChanges() to Exception
- From: Chuck Hill <email@hidden>
- Date: Mon, 10 Nov 2008 11:20:04 -0800
OK, that is just crazy. My best guess is that some in your model /
project has gotten totally scrambled. Try creating a totally new
project and make a very minimal example to see if you can get it to
work.
Chuck
On Nov 10, 2008, at 2:25 AM, Tim Kitchener wrote:
On 8 Nov 2008, at 01:47, Chuck Hill wrote:
We really need the entire, complete stack trace. Something odd is
going on.
Chuck
Apologies for the delay.
Code
public WOComponent updateTest() {
Session session = (Session) session();
EOEditingContext ec = session.defaultEditingContext();
DbTest dbObj = (DbTest) EOUtilities.objectWithPrimaryKeyValue(ec,
"Test", 1);
dbObj.setFreeText("why does this not work - ARGH!");
ec.saveChanges(); /* This line throws the exception */
return null;
}
Stack Trace
[2008-11-10 10:15:42 GMT] <WorkerThread0>
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
com.webobjects.eoaccess.EOGeneralAdaptorException:
updateStatementForRow: qualifier may not be null
[2008-11-10 10:15:42 GMT] <WorkerThread0>
com.webobjects.eoaccess.EOGeneralAdaptorException:
updateStatementForRow: qualifier may not be 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
com
.kennettnet
.WOGeocacheServer.components.DbTest.updateTest(DbTest.java:101)
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:585)
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
com
.webobjects
.appserver
._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at
com
.webobjects
.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:
115)
at
com.webobjects.appserver._private.WOForm.invokeAction(WOForm.java:141)
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
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
com
.webobjects
.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
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:613)
Thanks,
-- Tim
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden