Version conflict problem

Ricardo Tedim <[email protected]> Thu, 14 Jul 2005 03:16:36 +0100
Newsgroups gmane.comp.java.enhydra.dods
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1121307157-24448-328
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

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




------------=_1121307157-24448-328
Content-Type: text/plain; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: 8bit


--
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

------------=_1121307157-24448-328--