Re: Commit Exception Error

2008-01-13 Thread Andrus Adamchik
As far as Cayenne is concerned, javax.sql.DataSource is pluggable. Cayenne provides one to you by default, but with the help of DataSourceFactory in the Modeler (or even directly via API) you can set your own DataSource with custom behavior. The simplest thing would be to use a non-pooling

Re: Commit Exception Error

2008-01-13 Thread marco turchi
Hi Andrus, I was wandering about my project and I can try to change the structure of the code but is it possible to close the connection and reopen it when I need it inside the same java project? It means that I can get the data from mysql, close the connection, compute what I need and reopen t

Re: Commit Exception Error

2008-01-13 Thread marco turchi
I understand, but which are the option in my.cnf that I should change? are there any specific entries that I need to enable or disable? thanks Marco On Jan 13, 2008 10:32 AM, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > At this point it is hard to recommend anything specific with no access > to y

Re: Commit Exception Error

2008-01-13 Thread Andrus Adamchik
At this point it is hard to recommend anything specific with no access to your environment... Now that the client side is setup to handle connection timeouts, you may have to start digging on the server side, tweaking appropriate MySQL options (e.g. those in my.cnf). Andrus On Jan 12, 200

Re: Commit Exception Error

2008-01-12 Thread marco turchi
Hi Andrus, I have created the new url adding what u have suggested me... but I get again the same error: org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 2007] Commit Exception at org.objectstyle.cayenne.access.DataContext.flushToParent( DataContext.java:1290) at org

Re: Commit Exception Error

2008-01-11 Thread Andrus Adamchik
To make it valid XML you will need to replace "&" with "&" (or use CayenneModeler that will do it for you). Andrus On Jan 11, 2008, at 12:02 PM, marco turchi wrote: I have added the string that u send me, value="jdbc:mysql://enm-nc-srv1/subsumer? connectTimeout=0&autoReconnect=true"/>

Re: Commit Exception Error

2008-01-11 Thread marco turchi
I have added the string that u send me, but I get: java.lang.ExceptionInInitializerError at com.translation.alg.TranslationNews.run(TranslationNews.java:33) at com.translation.alg.TranslationNews.main(TranslationNews.java:21) Caused by: org.objectstyle.cayenne.ConfigurationExcep

Re: Commit Exception Error

2008-01-11 Thread marco turchi
Thanks...I'm going to try... Marco On Jan 11, 2008 9:39 AM, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > This is still a connection timeout issue. I dug up some of my own > production configurations developed to address a similar issue. Here > is another URL parameter you may try - "connectTimeou

Re: Commit Exception Error

2008-01-11 Thread Andrus Adamchik
This is still a connection timeout issue. I dug up some of my own production configurations developed to address a similar issue. Here is another URL parameter you may try - "connectTimeout". E.g.: jdbc:mysql://server/database?connectTimeout=0&autoReconnect=true Andrus On Jan 11, 2008, a

Re: Commit Exception Error

2008-01-10 Thread marco turchi
Hi Andrus, no good news... I have run the software using the changes that u have suggested me, but I get: 10 Jan 2008 23:19:30,036 - ERROR main com.translation.alg.TranslationNews - Fatal Error: org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 2007] Commit Exception at org.ob

Re: Commit Exception Error

2008-01-10 Thread marco turchi
sorry about that... :-) Thanks Marco On Jan 10, 2008 12:47 PM, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > Ah cool. I thought I was going crazy :-) > > Andrus > > On Jan 10, 2008, at 2:37 PM, marco turchi wrote: > > > Hi Andrus, > > sorry you are right I have added the autoReconnect to the wrong

Re: Commit Exception Error

2008-01-10 Thread Andrus Adamchik
Ah cool. I thought I was going crazy :-) Andrus On Jan 10, 2008, at 2:37 PM, marco turchi wrote: Hi Andrus, sorry you are right I have added the autoReconnect to the wrong place... now the software is started, I'll see what happens at the end... thanks Marco On Jan 10, 2008 11:01 AM, marco

Re: Commit Exception Error

2008-01-10 Thread marco turchi
Hi Andrus, sorry you are right I have added the autoReconnect to the wrong place... now the software is started, I'll see what happens at the end... thanks Marco On Jan 10, 2008 11:01 AM, marco turchi <[EMAIL PROTECTED]> wrote: > > > value="jdbc:mysql://enm-nc-srv1/subsumer?autoReconne

Re: Commit Exception Error

2008-01-10 Thread marco turchi
thanks Marco On Jan 10, 2008 10:51 AM, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > > > > On Jan 10, 2008, at 12:33 PM, marco turchi wrote: > > >>> DataSource load failed - Can not load JDBC driver named > >>> 'com.mysql.jdbc.Driver > >>> ?autoReconnect=true': com.mys

Re: Commit Exception Error

2008-01-10 Thread Andrus Adamchik
On Jan 10, 2008, at 12:33 PM, marco turchi wrote: DataSource load failed - Can not load JDBC driver named 'com.mysql.jdbc.Driver ?autoReconnect=true': com.mysql.jdbc.Driver?autoReconnect=true But this is what generates an error... so somehow the driver name seems messed up. Could you po

Re: Commit Exception Error

2008-01-10 Thread marco turchi
Sorry Andrus I have this line: inside the drive file but this does not work... Thanks Marco On Jan 10, 2008 8:39 AM, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > > maybe I have added it to the wrong place... > > > Most likely... "autoReconnect=true" should be appended to the URL, not > t

Re: Commit Exception Error

2008-01-10 Thread Andrus Adamchik
maybe I have added it to the wrong place... Most likely... "autoReconnect=true" should be appended to the URL, not the driver name. Andrus On Jan 10, 2008, at 4:38 AM, marco turchi wrote: Hi Andrus, I have added the jdbc:mysql://localhost/test?autoReconnect=true string to file.driver

Re: Commit Exception Error

2008-01-09 Thread marco turchi
Hi Andrus, I have added the jdbc:mysql://localhost/test?autoReconnect=true string to file.driver.xml file into my cayenne model, but I get this error: org.objectstyle.cayenne.ConfigurationException: [v.1.2.3 May 6 2007] Error during Configuration initialization. [v.1.2.3 May 6 2007] Load failures.

Re: Commit Exception Error

2008-01-09 Thread Andrus Adamchik
Hi Marco, I think what you need is a reconnect parameter in your MySQL URL. E.g.: jdbc:mysql://localhost/test?autoReconnect=true Andrus On Jan 8, 2008, at 8:02 PM, marco turchi wrote: Dear experts, I'm running a java software that gets some data from the DB, computes them and the write