Re: java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-25 Thread clj123
If I'm running only one thread in my application, do you know which other thread is trying to interrupt the main thread? On Feb 24, 6:35 pm, Shantanu Kumar kumar.shant...@gmail.com wrote: If it is about Thread/sleep, you can perhaps use something like this: (defn sleep   [n]   (try

Re: java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-24 Thread clj123
That didn't solve the problem. I've tried smaller row numbers and it still throws the same error: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.InterruptedException at clojure.lang.LazySeq.sval(LazySeq.java:47) at

Re: java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-24 Thread Michael Ossareh
On Thu, Feb 24, 2011 at 14:36, clj123 ariela2...@gmail.com wrote: That didn't solve the problem. I've tried smaller row numbers and it still throws the same error: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.InterruptedException at

Re: java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-24 Thread clj123
I've also noticed that I can cause this InterruptedException to be thrown if I add (. Thread (sleep 1000)) instead of saving to database. It looks like when a thread is waiting for a long time this exception is being thrown. By the way I'm running only one thread in my code. Here's the rest of

Re: java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-24 Thread Shantanu Kumar
If it is about Thread/sleep, you can perhaps use something like this: (defn sleep [n] (try (Thread/sleep n) (catch InterruptedException e (.interrupt (Thread/currentThread) There might be other situations where the underlying API throws InterruptedException - deal with them

java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-23 Thread clj123
I'm getting the following exception trying to insert large batch data in the database. Any ideas? java.lang.Exception: transaction rolled back: java.lang.InterruptedException at clojure.contrib.sql.internal$throw_rollback.invoke(internal.clj: 142) at clojure.contrib.sql.internal

Re: java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-23 Thread Saul Hazledine
On Feb 23, 9:54 pm, clj123 ariela2...@gmail.com wrote: I'm getting the following exception trying to insert large batch data in the database. I'd try to write less data at one time to the database. Start with, say, 20 rows at a time. Saul -- You received this message because you are