depricated :) you already find that trouble is :)) -----Original Message----- From: Alexey A. Efimov Sent: Thursday, January 24, 2002 1:43 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Long Transaction Problem !!! HELP
I not sure but. try this selects: select * from utilisateur; and check that all field are equive to fields of just readed object in Castor (make db.load and print all fields, then check in database); I use ORACLE and, empty strings holded as NULL (I converted by reflection all "" straings to NULL before update). Maybe in MSSQL it just reverse - NULL holds as "" string, then you must convert all null in class to ""; Debug it throught P6SpyDriver -----Original Message----- From: Tancerel Benoit [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 1:32 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Long Transaction Problem !!! HELP i use MS SQL Server on a windows 2000 server and my web app is on a linux redhat 7 Ben. -----Message d'origine----- De: Alexey A. Efimov [SMTP:[EMAIL PROTECTED]] Date: jeudi 24 janvier 2002 11:13 A: [EMAIL PROTECTED] Objet: Re: [castor-dev] Long Transaction Problem !!! HELP I sent you P6SpyDriver, it can log SQL unpak into classpath of allication server and check spy.properties What type of Database you used? -----Original Message----- From: Tancerel Benoit [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 1:01 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Long Transaction Problem !!! HELP i can't see the SQL this is my log [DEBUG]- timestamp : 1011863524612 this the timestamp of the object i pass through the session [DEBUG]- timestamp : 1011863524612 this the timestamp of the current object i want to update (so i' am sure it bthe same object and i wasn't modifed) [DEBUG]- ##49## -- [DEBUG]- ##titi## | [DEBUG]- ##titi## | [DEBUG]- ##code060## | [DEBUG]- ##2## | [DEBUG]- ##secret## | [DEBUG]- ##null## | the ##data## i want to store (theres no "" values) [DEBUG]- ##null## | [DEBUG]- ##null## | [DEBUG]- ##2002-04-23## | [DEBUG]- ##2002-01-23## | [DEBUG]- ##N## -- [pilote] Castor: Storing cg95.pilote.metier.HabilitationMetier (49) org.exolab.castor.jdo.ObjectModifiedException: Transaction aborted: Object of type cg95.pilote.metier.HabilitationMetier with identity 49 has been modified by a concurrent transaction at org.exolab.castor.jdo.engine.SQLEngine.store(SQLEngine.java:867) at org.exolab.castor.persist.ClassMolder.store(ClassMolder.java: 1584) at org.exolab.castor.persist.LockEngine.store(LockEngine.java:758) at org.exolab.castor.persist.TransactionContext.prepare(TransactionContext. java:1457) at org.exolab.castor.jdo.engine.DatabaseImpl.commit(DatabaseImpl.java:499) at cg95.pilote.metier.HabilitationMetier.setHabilitation(HabilitationMetier .java:321) at cg95.pilote.action.EditHabilitationAction.perform(EditHabilitationAction .java:169) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServle t.java:1786) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(Unknown Sou rce) at org.apache.tomcat.core.Handler.invoke(Unknown Source) at org.apache.tomcat.core.Handler.service(Unknown Source) at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) at org.apache.tomcat.core.ContextManager.internalService(Unknown Source) at org.apache.tomcat.core.ContextManager.service(Unknown Source) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unk nown Source) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source) at java.lang.Thread.run(Thread.java:484) thanks Ben -----Message d'origine----- De: Alexey A. Efimov [SMTP:[EMAIL PROTECTED]] Date: jeudi 24 janvier 2002 10:40 A: [EMAIL PROTECTED] Objet: Re: [castor-dev] Long Transaction Problem !!! HELP Heelo, try check SQL, that Castor send to Database. I suppose in this SQL like this: update se bla bla bla WHERE field1=value1 and ... Try execute SQL manualy. If you get 0 ros(s) - it mean that Castor guess that object modified by annoter process or transaction becose WHERE clause is incorect. If Castor get 0 rows during update it throw ObjectModifiedExcpetion Try before update debug all object field and make sure that all fields are correct. -----Original Message----- From: Tancerel Benoit [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 12:19 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Long Transaction Problem !!! HELP i tried with all the options of <cache-type/> all my value of my persistent object are values or null (there's no "" values) and my db.update always send me an ObjectModifiedExcpetion if use db.load, set my fields and db.commit how can i know that my data were changed by another user ?? Ben -----Message d'origine----- De: Alexey A. Efimov [SMTP:[EMAIL PROTECTED]] Date: mercredi 23 janvier 2002 20:22 A: [EMAIL PROTECTED] Objet: Re: [castor-dev] Long Transaction Problem !!! HELP Castor hold timestamp labels in this cache. If you turn off the cache, Castor no stote timestamps, it make imposible timestamp compare, and Castor throws timeStamp. You can turn cach to on. Or use db.load then set fields and db.commit -----Original Message----- From: Tancerel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 10:09 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Long Transaction Problem !!! HELP is the <cache-type/> value is important in this case ? if i put none , castor indicates me that thers is no timestamp Ben -----Message d'origine----- De: Oleg Nitz [SMTP:[EMAIL PROTECTED]] Date: mercredi 23 janvier 2002 17:26 A: [EMAIL PROTECTED] Objet: Re: [castor-dev] Long Transaction Problem !!! HELP Tancerel wrote: > but in my previous question, i've got a problem of already modified > object with my db.update > so what is the solution about that I have no idea, your code snippet is small, but what I see is correct. You said that your object implements TimeStampabe. I wonder if is't implemented correctly: is the timestamp value really hold unchanged during the long transaction? Another question: did you turned the castor cache off by <cache-type type="none"/> in mapping.xml? Oleg ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev << Fichier: P6SpyDriver.zip>> ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
