Re: strange Exception while trying to delete EO...
Re: strange Exception while trying to delete EO...
- Subject: Re: strange Exception while trying to delete EO...
- From: Max Muller <email@hidden>
- Date: Wed, 11 Feb 2004 18:15:14 -0800
Hi Thomas,
The error that you are seeing is because the SQL being executed isn't
finding exactly one row to delete. Try turning on the SQL to see what
it is trying to delete. I have run into several problems where the
jdbcInfo in my model has been messed up so the only attribute that EOF
thought it needed to lock on was the date fields. This obviously would
cause all sorts of problems. If you only see the WHERE clause not
contain attributes that you have specified should be locked on you
could be in the same boat I ended up in.
Regards,
Max
On Feb 11, 2004, at 2:41 PM, Thomas Engeroff wrote:
Dear List,
this is really strange!
I have a method which is called in Application.java after the WO app is
started.
Actually it's a separate thread which is called 30 seconds after the
app has
been started.
It's supposed to delete certain Objects from a table of my Database
(MySQL).
I have done similar tasks like this several times before, but this
time it
just doesn't wanna work.
I do the following:
I use a WODisplaygroup to search for the row (the object) I want to
delete.
I get the EOEditingContext of the eo like this: ec =
myEO.editingContext();
The context is ok and not null. Then I delete the eo from the context
like
this:
ec.deleteObject(myEO);
After that I try to save the ec and get the following exception.
ec.saveChanges();
I also tried to remove the eo from the DisplayGroup and then called
saveChanges, which produced the exact same Error!
Another time I locked the ec before removing and saving the Object.
Same
problem!
I have no idea what is going on! Please help!
Any help is greatly appreciated!!!
Thanks,
Thomas E.
--> the Exception:
com.webobjects.eoaccess.EOGeneralAdaptorException:
deleteRowDescribedByQualifierEntity --
com.webobjects.jdbcadaptor.JDBCChannel: method failed to delete row in
database
at
com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContext
Infor
mationAdded(EODatabaseContext.java:4657)
at
com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseCont
ext.j
ava:6365)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingC
ontex
t(EOObjectStoreCoordinator.java:411)
at
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.
java:
3148)
at
xmlImport.XMLFileToEOConverter.convertImmoObjectToEO(XMLFileToEOConvert
er.ja
va:217)
at
xmlImport.XMLFileToEOConverter.startProcessing(XMLFileToEOConverter.jav
a:120
)
at
xmlImport.XMLFileToEOConverter.<init>(XMLFileToEOConverter.java:55)
at
xmlImport.AutomatedXMLImport.checkForNewZipInUploadFolder(AutomatedXMLI
mport
.java:101)
at xmlImport.AutomatedXMLImport.run(AutomatedXMLImport.java:59)
at java.lang.Thread.run(Thread.java:534)
2004-02-11 23:25:29,531 ERROR ImmoShopInternational[-:2734 0]
AutomatedXMLImport (AutomatedXMLImport.java:67) - Error --
com.webobjects.eoaccess.EOGeneralAdaptorException:
deleteRowDescribedByQualifierEntity --
com.webobjects.jdbcadaptor.JDBCChannel: method failed to delete row in
database
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.