Werner,
The only difference I see is that ObjectNotFoundException is caught but later re-thrown.
What is the best way to merge a patch in cygwin. I did it by hand.
Steve
----- Original Message ----- From: "Stephen Ince" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 03, 2004 8:51 AM
Subject: Re: [castor-user] [JDO] Key Generator Failure. Duplicated Identity is generated!
Werner,
I have a customer that is intermittently getting the error. I could test it out.
Steve
----- Original Message ----- From: "Werner Guttmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 03, 2004 4:57 AM
Subject: Re: [castor-user] [JDO] Key Generator Failure. Duplicated Identity is generated!
Steve,
Actually, it's bug 1097, and it has NOT been committed yet. It would be nice if you could take the patch attached and let us know whether it addresses
your issue (if downloading sources, building Castor yourself, etc. is an option for you at all).
Werner
On Thu, 2 Dec 2004 06:06:43 -0500, Stephen Ince wrote:
Werner, Do you have a bug id, reference or patch for this bug?
Steve
----- Original Message ----- From: "Werner Guttmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 02, 2004 4:27 AM
Subject: Re: [castor-user] [JDO] Key Generator Failure. Duplicated Identity
is generated!
Sean,
are you still using Castor 0.9.5.3 ? Afair, this problem has been fixed in
CVS, and will be part of the upcoming 0.9.6 release .
Thanks Werner
PS The problem fixed is that as a result of an ObjectNotFoundException, sometimes a lock has not been released.
org.exolab.castor.persist.LockEngine$TypeInfo.access$400(LockEngine.java:1038)This might be a bug of castor, please try on your project to see if it would happen.
I'm using mysql and my mapping file contains something like this: ------------------------------------- <key-generator name="HIGH-LOW"> <param name="table" value="sequence"/> <param name="key-column" value="tablename"/> <param name="value-column" value="currentid"/> <param name="same-connection" value="true"/> <param name="grab-size" value="1"/> </key-generator>
<class identity="id" key-generator="HIGH-LOW" name="model.User"> <map-to xml="user" table="user" /> <field name="id" type="integer"> <sql name="id" type="integer" /> </field> <field name="name" type="string"> <sql name="name" type="varchar" /> </field> </class>
Suppose that current MAX id of user table is 1000, and the following statments: ------------------------------------- Integer id = new Integer(1001); User user = database.load(User.class, id);
will throw an exception: ------------------------------------- org.exolab.castor.jdo.ObjectNotFoundException: The object of type model.User with identity 1,001 was not found in persistent storage
After this, new user object could never be created: ------------------------------------- User user = new User(); user.setName("Sean"); database.create(user);
throws an exception: ------------------------------------- org.exolab.castor.jdo.LockNotGrantedException: Lock is already existed for the new oid. at org.exolab.castor.persist.LockEngine$TypeInfo.rename(LockEngine.java:1357) at
org.exolab.castor.persist.TransactionContext.create(TransactionContext.java:907)at org.exolab.castor.persist.LockEngine.create(LockEngine.java:496) at
at org.exolab.castor.jdo.engine.DatabaseImpl.create(DatabaseImpl.java:374) ... org.exolab.castor.jdo.PersistenceException: Nested error: Key Generator Failure. Duplicated Identity is generated!
I searched the Internet and can't find any solution to the exception. Do
you have any suggestion?
http://hypermail.linklord.com/castor-dev/2004/Apr/4119.html
Thanks, Sean
-- NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl GMX DSL-Netzanschluss + Tarif zum superg�nstigen Komplett-Preis!
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
--------------------------------------------------------------------------------
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
