-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: c3po closing connection on PSQLException
PostPosted: Thu Dec 16, 2004 2:28 pm 
Newbie

Joined: Thu Dec 16, 2004 2:19 pm
Posts: 12
Hibernate version: 2.1

I am using spring + hibernate + c3p0 and I am having issue when inserting a record with duplicate key (on purpose).

I traced the sequence of events down to this:

1. insert dup key record

2. db throws PSQLException: ERROR: duplicate key violates unique constraint

3. c3p0 "see" the exception and abandon the connection:

[c3p0] A PooledConnection died due to the following error!
org.postgresql.util.PSQLException: ERROR: duplicate key violates unique constraint

4. transaction manager "see" the exception and rollback

5. roll back failed because the connection was abandoned in 3 above.


Is this a configuration issue ? I think c3p0 should not abandon connection under certain conditions (like constraint violation).

Thanks in advance for helping.

-cs


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2004 11:56 pm 
Newbie

Joined: Thu Dec 16, 2004 2:19 pm
Posts: 12
the lastest version of c3p0 resolved this issue.

-cs


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.