Re: Dealing with a commit exception....

2021-06-24 Thread Tony Giaccone
Mike Gentrry -> I agree 10 is a small batch size, but I wanted to keep it small to start to get a sense of if this was going to work. Given that it's looking better and better that number is probably going to grow, maybe substantially. Lon - the problem is that the batch entries all fails together

Re: Dealing with a commit exception....

2021-06-24 Thread John Huss
Actually most (or all?) DBs that cayenne supports will do a batch bind for multiple inserts, which is quite a bit faster than issuing separate sql statements. On Thu, Jun 24, 2021 at 10:14 AM Jurgen Doll wrote: > I'm not sure about this, but I don't think Cayenne does SQL batch insert > statemen

Re: Dealing with a commit exception....

2021-06-24 Thread Jurgen Doll
I'm not sure about this, but I don't think Cayenne does SQL batch insert statements - it does each insert (even in a batch) as single SQL insert statements. If this is the case then there's no real advantage, I think, to doing batch commits with Cayenne in this particular case (or am I mist

Re: Dealing with a commit exception....

2021-06-24 Thread Michael Gentry
10 is a rather small batch size. I'd suggest at least 100, perhaps even 1000, unless you are expecting tons of problem records. For your hashing concerns, could you maybe store that in an H2 DB you use for this migration? On Wed, Jun 23, 2021 at 12:54 PM Tony Giaccone wrote: > Yeah, that's not

Re: Dealing with a commit exception....

2021-06-23 Thread Lon Varscsak
You could commit your batch of 10 and then on error, check each object against the DB. If the batch succeeds, there is nothing special to do. Assuming your "failure" batches are infrequent, then the time to check them won't be an issue. On Wed, Jun 23, 2021 at 9:54 AM Tony Giaccone wrote: > Yea

Re: Dealing with a commit exception....

2021-06-23 Thread Tony Giaccone
Yeah, that's not a solution that's going to work. I need to move about a million records from one database to a second, and the delay associated with querying the database for every record would take a problem that's already going to take more than a day to complete and turn it into several days.

Re: Dealing with a commit exception....

2021-06-23 Thread John Huss
I think it would be better to figure out the "problem" objects before committing by querying the DB and the object context. On Wed, Jun 23, 2021 at 9:47 AM Tony Giaccone wrote: > I have a list of 10 new objects that I've inserted into the objectcontex > and am about to do a commit changes on the

Dealing with a commit exception....

2021-06-23 Thread Tony Giaccone
I have a list of 10 new objects that I've inserted into the objectcontex and am about to do a commit changes on the object context. One, or more, of those entries violates a constraint and causes the commit changes to throw an exception. Now most of them are probably ok, so I want to make sure t

Re: Commit Exception

2018-09-29 Thread Michael Gentry
de the > > run > > > time go to 4 minutes and I can live with that. What I really wanted to > do > > > was find a way to recover from a larger commit. It seems that's not > > really > > > possible. The one feature that would make that failure easier to deal

Re: Commit Exception

2018-09-28 Thread Tony Giaccone
ssible. The one feature that would make that failure easier to deal > with > > would be some kind of data value in commit error that would identify the > > class and key value of the object that caused the commit exception. I > > recognize that the value is there in the text, but p

Re: Commit Exception

2018-09-28 Thread Bob Schellink
really > possible. The one feature that would make that failure easier to deal with > would be some kind of data value in commit error that would identify the > class and key value of the object that caused the commit exception. I > recognize that the value is there in the text, but pars

Re: Commit Exception

2018-09-28 Thread John Huss
was find a way to recover from a larger commit. It seems that's not really > possible. The one feature that would make that failure easier to deal with > would be some kind of data value in commit error that would identify the > class and key value of the object that caused the com

Re: Commit Exception

2018-09-28 Thread Tony Giaccone
not really possible. The one feature that would make that failure easier to deal with would be some kind of data value in commit error that would identify the class and key value of the object that caused the commit exception. I recognize that the value is there in the text, but parsing through

Re: Commit Exception

2018-09-27 Thread John Huss
Commit the ObjectContext after each object/row and rollback the ObjectContext on failure. On Thu, Sep 27, 2018 at 3:57 PM Tony Giaccone wrote: > So the question isn't as much about who to manage the transaction. It's > more about how to recover and eliminate the offending object so that the > co

Re: Commit Exception

2018-09-27 Thread Tony Giaccone
So the question isn't as much about who to manage the transaction. It's more about how to recover and eliminate the offending object so that the commit can be made again. On Thu, Sep 27, 2018 at 3:52 PM John Huss wrote: > I'd just wrap the whole thing in a database transaction. Then commit your

Re: Commit Exception

2018-09-27 Thread John Huss
I'd just wrap the whole thing in a database transaction. Then commit your ObjectContexts as often as you want to, but the real DB commit won't happen until the end. TransactionManager transactionManager = CayenneRuntime.*getThreadInjector* ().getInstance(TransactionManager.*class*); transactionMa

Commit Exception

2018-09-27 Thread Tony Giaccone
I'm processing a large number of rows, over 600,000 and the key value should be unique in this file but I'd like to ensure that. I also want this to happen with some rapidity. To speed this process upI'm going to read lines from the file, create objects and commit the changes after 500 have been c

Re: Commit Exception Error

2008-01-13 Thread Andrus Adamchik
ate MySQL options (e.g. those in my.cnf). Andrus On Jan 12, 2008, at 10:08 PM, marco turchi wrote: 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 E

Re: Commit Exception Error

2008-01-13 Thread marco turchi
new url adding what u have suggested me... > > > > > value="jdbc:mysql://enm-nc-srv1/subsumer? > > > connectTimeout=0&autoReconnect=true"/> > > > but I get again the same error: > > > org.objectstyle.cayenne.CayenneRuntimeE

Re: Commit Exception Error

2008-01-13 Thread marco turchi
t; > > Hi Andrus, > > I have created the new url adding what u have suggested me... > > > value="jdbc:mysql://enm-nc-srv1/subsumer? > > connectTimeout=0&autoReconnect=true"/> > > but I get again the same error: > > org.objectstyle.

Re: Commit Exception Error

2008-01-13 Thread Andrus Adamchik
.2.3 May 6 2007] Commit Exception at org.objectstyle.cayenne.access.DataContext.flushToParent( DataContext.java:1290) at org.objectstyle.cayenne.access.DataContext.commitChanges( DataContext.java:1166) at com.translation.alg.WriterData.insert(WriterData.j

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

Re: Commit Exception Error

2008-01-11 Thread Andrus Adamchik
ews... 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.objectstyle.cayenne.access.DataContext.flushToParent(

Re: Commit Exception Error

2008-01-11 Thread marco turchi
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: > > >

Re: Commit Exception Error

2008-01-11 Thread marco turchi
hanges 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 > > E

Re: Commit Exception Error

2008-01-11 Thread Andrus Adamchik
[v.1.2.3 May 6 2007] Commit Exception at org.objectstyle.cayenne.access.DataContext.flushToParent( DataContext.java:1290) at org.objectstyle.cayenne.access.DataContext.commitChanges( DataContext.java:1166) at com.translation.alg.WriterData.insert(WriterData.java

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

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

Re: Commit Exception Error

2008-01-10 Thread Andrus Adamchik
untimeException: [v.1.2.3 May 6 2007] Commit Exception at org.objectstyle.cayenne.access.DataContext.flushToParent( DataContext.java:1290) at org.objectstyle.cayenne.access.DataContext.commitChanges ( DataContext.java:1166) at com.translation.alg.WriterData

Re: Commit Exception Error

2008-01-09 Thread marco turchi
tation of the > > data gets 10 hs... > > I'm able to get the data, compute them, but when I try to write to > > the DB, I > > get this error: > > org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 > > 2007] Commit &

Re: Commit Exception Error

2008-01-09 Thread Andrus Adamchik
d the writes the result to the DB... Unfortunately, the computation of the data gets 10 hs... I'm able to get the data, compute them, but when I try to write to the DB, I get this error: org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 2007] Commit Exception

Commit Exception Error

2008-01-08 Thread marco turchi
this 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.objectstyle.cayenne.access.DataContext.commitChanges ( DataContext.java:1166) at com.translation.alg.WriterD

commit exception after server restart

2007-07-19 Thread Peter Schröder
hi, we have some trouble with our clustered applications. after restarting one of the servers the user gets a commit exception (see below). i think that this is already reported as a bug, but jira seems to be down... https://issues.apache.org/cayenne/browse/CAY-796 is there something we can do