Closed GoogleCodeExporter closed 9 years ago
What is your query? Does this happen with all API calls?
It seems like one of the API calls opens a transaction without closing it.
The next API call then causes a nested transaction exception when opening a new
transaction.
So, please provide information which API call it was that caused this problem
and whether other API calls also cause this exception.
Also: Which MySQL Server version did you use?
Original comment by oliver.ferschke
on 12 Apr 2012 at 7:06
mysql version = 5.1.49-3
The following steps simulate the problem:
Wikipedia wiki = new Wikipedia(dbConfig);
Category topC = wiki.getCategory(CATEGORY);
//The above query runs perfectly
Thread.sleep(20000);
topC = wiki.getCategory(CATEGORY);
//Console Output is in "firstError.txt"
If I try to catch the jdbc exception, redoing the same query (getCategory), I
have the "nested transaction" problem.
I have also tried to close the current session and the SessionBuilder but the
problem persists.
I think all queries have the same behavior.
Thanks for any help
Original comment by cppgabri...@gmail.com
on 13 Apr 2012 at 2:44
Attachments:
I could not reproduce this behavior.
Your code example works fine on my machine.
Original comment by oliver.ferschke
on 13 Apr 2012 at 4:55
Please, try to reproduce the behavior with this mysql configuration.
Original comment by cppgabri...@gmail.com
on 23 Apr 2012 at 4:54
Attachments:
If JWPL can be configured with a c3p0 connection pool, that should resolve the
problem. The pool will automatically create/reopen connections as necessary.
Original comment by richard.eckart
on 24 Apr 2012 at 10:47
Problem solved!!!! I have run the application with -Dhibernate.c3p0.timeout=10.
Thanks
Original comment by cppgabri...@gmail.com
on 24 Apr 2012 at 1:14
Hi, great that the issue is solved.
I thought I already switched to the c3p0 connection pool, but this was actually
in another project.
Original comment by oliver.ferschke
on 25 Apr 2012 at 9:34
I have a similar problem, could you please describe your solution in detail
(how to configure the c3p0)?
Thanks.
Original comment by astronau...@gmail.com
on 26 Apr 2012 at 8:34
I have never configured c3p0. Simply add c3p0-0.9.1.jar and
hibernate-c3p0-4.1.1.Final.jar in your build path, then run your application
with the option
-Dhibernate.c3p0.timeout=[your timeout]
This option overrides the default configuration.
If you don't want to use it by command line, you can add the following line in
your code:
System.setProperty("hibernate.c3p0.timeout", "10"); //10 is the chosen timeout
I hope this works for you.
Original comment by cppgabri...@gmail.com
on 26 Apr 2012 at 9:00
It works for me.
Thank you
Original comment by astronau...@gmail.com
on 26 Apr 2012 at 1:46
Fixed in r573/574
c3p0 connection pool is now configured and dependency added
Original comment by oliver.ferschke
on 3 May 2012 at 8:05
Original comment by oliver.ferschke
on 15 Aug 2012 at 9:21
Original issue reported on code.google.com by
cppgabri...@gmail.com
on 30 Mar 2012 at 2:50