Dead lock when use BoneCP + H2 in Nutz

Bug #721739 reported by Wendal Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BoneCP
New
Undecided
Unassigned

Bug Description

We had create a testcase in http://code.google.com/p/nutz/source/browse/trunk/test/org/nutz/dao/test/normal/BoneCP_Test.java

The same code , if we use :
Apache DBCP + H2, Pass
Apache DBCP + Mysql Pass
BoneCP + MySQL Pass
BoneCP + H2 Fail

We had test v0.7.0 and v0.7.1rc3 , all fail.

Revision history for this message
Wallace Wadge (wwadge) wrote :

Hi,

Can you please test with v0.7.1-rc4-SNAPSHOT?

https://oss.sonatype.org/content/groups/public/com/jolbox/bonecp/

Thanks,
Wallace

Revision history for this message
Wallace Wadge (wwadge) wrote :

Is this the bug you're having:
http://code.google.com/p/nutz/issues/detail?id=360

If yes, the stack trace clearly indicates that the pool has done it's job:
at com.jolbox.bonecp.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:197)

There is no DB specific code that should cause the issue you're seeing.

Revision history for this message
Wendal Chen (wendal1985) wrote :

Is that means it is a bug in H2 database ?

Revision history for this message
Wallace Wadge (wwadge) wrote :

Probably the default timeout is just too low (1 second):

http://h2database.com/html/grammar.html#set_lock_timeout

Revision history for this message
Wendal Chen (wendal1985) wrote :

Not help, I set to 5s , 10s, 60s, it fail either.

Revision history for this message
Wallace Wadge (wwadge) wrote :

Can you post your BoneCP config? Also have you tested with 0.7.1-rc4-SNAPSHOT?

Revision history for this message
Wendal Chen (wendal1985) wrote :

My Config:
jdbcUrl : 'jdbc:h2:mem:abc',
username : 'sa',
password : '',
logStatementsEnabled : true

JDK6 , Eclipse 3.6.1, H2 1.2.144

If I use bonecp-0.7.1-rc4-20110219.223215-14.jar , it pass.

I notice that,in 0.7.0,when I get Connection from BoneCP, and CALL "conn.setAutoCommit(false)". Then ,next time I got the same ConnectionHandle,it is AutoCommit=false!! in 0.7.1rc4, it return the current value.

So , I think that is the problem. ~_~

0.7.1-rc4 is OK for use, Thank you for help!

Revision history for this message
Wallace Wadge (wwadge) wrote :

Yes, that bug was fixed pretty recently.

Closing off this report :-)

Changed in bonecp:
status: New → Invalid
Revision history for this message
borball zhai (borball) wrote :

Seems the problem is still existing in 0.7.1-RELEASE and 0.8.0-rc1, but it is working on 0.7.1-rc4.

Changed in bonecp:
status: Invalid → New
Revision history for this message
borball zhai (borball) wrote :

set is a New.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.