[enhydra] Re: [dods] Version conflict problem
Ricardo Tedim <[email protected]> Thu, 14 Jul 2005 05:14:46 +0100
| Newsgroups | gmane.comp.java.enhydra.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, I've noticed that in DODS 5.1 and 6.x (in opposition to previous versions) every DO generated has a new method associated to it where the "references" parameter is always being set to true by methods save(DBTransaction dbt) and save(): public void save(DBTransaction dbt, boolean references) For what I understood after sniffing the DODS generated code, when this parameter is set to true all the referenced DO's are being loaded (?) and updated in DB. Is this the real goal for this parameter? Why is it always set to true? Could this be related with the error I've described in the email bellow? Thanks in advance, Ricardo Ricardo Tedim wrote: > Hi, > > I'm using DODS 5.1 and I'm facing a problem with conflicting SQL > update statements (from different JVMs) to the same DB entry. I have > an object Entry that has a integrity reference to object User (both of > them aggregate their own DOs). If I try to update the same user from > different JVMs I get in one of them a version confict (as expected): > > [...] > Caused by: java.sql.SQLException: Update failed, but Table userinfo > id=1000023 does exist with version=5353 > at > com.lutris.appserver.server.sql.CoreDO.seeWhatHappened(Unknown Source) > at com.lutris.appserver.server.sql.CoreDO.executeUpdate(Unknown > Source) > at > com.lutris.dods.builder.generator.dataobject.GenericDO.executeUpdate(Unknown > Source) > at com.lutris.appserver.server.sql.CoreDO.executeInsert(Unknown > Source) > at > com.lutris.dods.builder.generator.dataobject.GenericDO.executeInsert(Unknown > Source) > at > com.mobicomp.mobilekeeper.data.db.user.UserDO.executeInsert(UserDO.java:2585) > > at > com.lutris.appserver.server.sql.standard.StandardDBTransaction.write(Unknown > Source) > at > com.lutris.appserver.server.sql.standard.StandardDBTransaction.commit(Unknown > Source) > at com.mobicomp.Entry.save(Entry.java:131) > ... 20 more > > However in the JVM where the version conflict occured, if I try to > perform any update to the User instance loaded in memory (loaded > before the version conflict occured), I always get the following > exception (in this example I try to save Entry which has a integrity > reference to User): > > [...] > Caused by: java.lang.NullPointerException > at com.mobicomp.UserDO.getUpdateStatement(UserDO.java:6023) > at com.lutris.appserver.server.sql.CoreDO.executeUpdate(Unknown > Source) > at > com.lutris.dods.builder.generator.dataobject.GenericDO.executeUpdate(Unknown > Source) > at com.lutris.appserver.server.sql.CoreDO.executeInsert(Unknown > Source) > at > com.lutris.dods.builder.generator.dataobject.GenericDO.executeInsert(Unknown > Source) > at > com.mobicomp.mobilekeeper.data.db.user.UserDO.executeInsert(UserDO.java:2585) > > at > com.lutris.appserver.server.sql.standard.StandardDBTransaction.write(Unknown > Source) > at > com.lutris.appserver.server.sql.standard.StandardDBTransaction.commit(Unknown > Source) > at com.mobicomp.Entry.save(Entry.java:131) > ... 20 more > > I was expecting an error in this situation but not a > NullPointerException. It seems like the object has become corrupted > with the version conflict. Is this some known issue from DODS 5.1? > > Thanks in advance, > Ricardo > >
message-footer.txt
(text/plain, 275 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws