Hello Werner,

The column in MySql is "double" and the field in Java is double as well.

I think you will be able to reproduce the problem by inserting several
times a very big number and running the program several times.

Thanks and regards.

Paquete  paquete = Paquete.load(new Integer(524));
paquete.setTransferencia(234242323423442342432.2342342342342342342343);
paquete.update();

Paquete paquete = Paquete.load(new Integer(524));
paquete.setTransferencia(3453453453.3453454365465456456456456456);
paquete.update();


        

-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
Sent: jueves, 01 de abril de 2004 23:08
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] org.exolab.castor.jdo.ObjectModifiedException:
Transaction aborted: Object has been modified by a concurrent
transaction (cache entry is different from database row)

Gonzalo,

one more question: what was the SQL type for the transferencia column
(assuming you've been using mySQL as stated in another email).

Regards
Werner

--Original Message Text---
From: Gonzalo Abollado
Date: Thu, 1 Apr 2004 17:37:50 +0200

Clean DocumentEmail 21 MicrosoftInternetExplorer4 /* Style Definitions
*/ table.MsoNormalTable {mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0;
mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm
5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New
Roman";}

Hello Tener, 



Thanks for your interest. 



I have tried with short transactions, long transactions and the problem
end up been very simple, if the value was too big I had the problem. 

I can�t easily send you the code because I have abstract classes then
classes that extends these ones, so, to see the code you will need to
have the full project. I can send you the mapping file. The mapping file
has timestamp values but it didn�t make any difference, I could take it
off and I still have the same problem. The field with the problem is
transferencia. 



Thanks a lot and best regards, 

Gonzalo. 





<mapping> 

<class name="com.costes.base.Paquete" identity="id"
key-generator="IDENTITY"> 

<map-to table="paquetes"/> 

<field name="id" type="integer"> 

<sql name="id" type="integer"/> 

</field> 

<field name="referencia" type="string"> 

<sql name="referencia" type="varchar"/> 

</field> 

<field name="descripcionCorta" type="string"> 

<sql name="descripcion_corta" type="varchar"/> 

</field> 

<field name="descripcionLargaBytes" type="bytes"> 

<sql name="descripcion_larga" type="blob" dirty="ignore"/> 

</field> 

<field name="fechaCreacion" type="date"> 

<sql name="fecha_creacion" type="timestamp"/> 

</field> 

<field name="idUsuario" type="integer"> 

<sql name="id_usuario" type="integer"/> 

</field> 

<field name="idPaquetePadre" type="integer"> 

<sql name="id_padre"/> 

</field> 

<field name="tipoFacturacion" type="integer"> 

<sql name="tipo_facturacion" type="integer"/> 

</field> 

<field name="idResponsable" type="integer"> 

<sql name="id_responsable" type="integer"/> 

</field> 

<field name="idContrato" type="integer"> 

<sql name="id_contrato"/> 

</field> 

<field name="comprometido" type="double"> 

<sql name="comprometido"/> 

</field> 

<field name="variacionesComprometido" type="double"> 

<sql name="variaciones_comprometido"/> 

</field> 

<field name="pendienteContratar" type="double"> 

<sql name="pendiente_contratar"/> 

</field> 

<field name="certificacion" type="double"> 

<sql name="certificacion"/> 

</field> 

<field name="pendienteCertificar" type="double"> 

<sql name="pendiente_certificar"/> 

</field> 

<field name="errorCertificacion" type="boolean"> 

<sql name="error_certificacion" type="integer[01]"/> 

</field> 

<field name="cambiosPendientes" type="double"> 

<sql name="cambios_pendientes"/> 

</field> 

<field name="idProyecto" type="integer"> 

<sql name="id_proyecto"/> 

</field> 

<field name="presupuesto" type="double"> 

<sql name="presupuesto"/> 

</field> 

<field name="variacionesPresupuesto" type="double"> 

<sql name="variaciones_presupuesto"/> 

</field> 

<field name="transferencia" type="double"> 

<sql name="transferencia"/> 

</field> 

<field name="totalEstimado" type="double"> 

<sql name="total_estimado"/> 

</field> 

<field name="tipo" type="integer"> 

<sql name="tipo"/> 

</field> 

<field name="totalSubpaquete" type="boolean"> 

<sql name="total_subpaquete" type="integer[01]"/> 

</field> 

<field name="estadoPresupuesto" type="integer"> 

<sql name="estado_presupuesto" type="integer"/> 

</field> 

</class> 

</mapping> 





-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
Sent: jueves, 01 de abril de 2004 11:37
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] org.exolab.castor.jdo.ObjectModifiedException:
Transaction aborted: Object has been modified by a concurrent
transaction (cache entry is different from database row) 



Gonzalo,

can you still provide me with a mapping file that shows what kind of
data you tried to persist ? And maybe a code fragment that highlights
the problem you were having ? Whilst taking off some decimal places
might help you in the short time, there might still be an issue with
Castor itself and the way it handles this cases.

Regards
Werner

-Original Message Text---
From: Gonzalo Abollado
Date: Wed, 31 Mar 2004 20:29:21 +0200

v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:*
{behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}Clean
Clean DocumentEmail 21 MicrosoftInternetExplorer4
st1\:*{behavior:url(#default#ieooui) }/* Style Definitions */
table.MsoNormalTable {mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0;
mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm
5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New
Roman";}

I found the problem& Thanks a lot for your tip, it help me a lot to find
the right path. 



The problem had to do with a double field in MySql. For some reason it
was storing the information with a lot of decimal values so, I suppose
the value was too big for the field and it was giving wrong information,
that�s why the system though that the value had change. Taking off some
decimal so the value fit in the field, problem solved. How easy& three
days of fighting, crying& 



Thanks a lot and best regards. 



-----Original Message-----
From: Nick Stuart [mailto:[EMAIL PROTECTED] 
Sent: mi�rcoles, 31 de marzo de 2004 19:11
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] org.exolab.castor.jdo.ObjectModifiedException:
Transaction aborted: Object has been modified by a concurrent
transaction (cache entry is different from database row) 



A mapping file would help out greatly with this. Be careful if you are
using any timestamps and the like as they can confuse castor at times if
you don't have the mapping set up correctly. 





Also, do you mean you can insert the item fine, but not update it? Also,
does your object implement Timestampable? 





-Nick 





From: Gonzalo Abollado [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 8:53 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] org.exolab.castor.jdo.ObjectModifiedException:
Transaction aborted: Object has been modified by a concurrent
transaction (cache entry is different from database row) 

Hello, 



This problem is very estrange and I can�t give a good example or
explanation but I�m lost and I don�t know how to fix it or how to
workaround it. 



I run a java program that modifies a record. First time it works fine,
next times it gives me this error: 



org.exolab.castor.jdo.ObjectModifiedException: Transaction aborted:
Object of type com.costes.base.Paquete with identity 497 has been
modified by a concurrent transaction (cache entry is different from
database row) 



I stop the database, re-boot the machine and It gives me the same error
when I run it. I have to delete the record manually from the DataBase
and Insert it again, then it works again but only one time& 



It�s crazy, I don�t now what to do next, I try to take off the cache,
different locks, it doesn�t make any difference. 



Can anyone tell me what can I do, is there anything to debug or to look
what castor is doing? What dues it have in the cache, anything that can
give me a clue. 



Thanks a lot and best regards. 

Gonzalo Abollado. 



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.647 / Virus Database: 414 - Release Date: 3/29/2004 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.647 / Virus Database: 414 - Release Date: 3/29/2004

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to