-->
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.  [ 14 posts ] 
Author Message
 Post subject: C3P0 - Connection reset by peer
PostPosted: Thu Feb 19, 2004 8:19 am 
Regular
Regular

Joined: Tue Oct 14, 2003 11:11 pm
Posts: 62
Location: Brasil/Curitiba
I'm having a problem with c3p0 pool configuration. Always that my database is reseted (Oracle 8), the connections are invalidated.

But I suppose that these connections must be discarted after this. I've configured the hibernate.c3p0.validate=true , but this isn't working...

Hibernate enters in a loop when it can't connect, and the following error is displayed many times:

Quote:
java.sql.SQLException: Io exception: Connection reset by peer: socket write error


Is the hibernate.c3p0.validate=true property correct ?

my hibernate.cfg.xml:
Code:
<!--
   C3P0 Connection Pool
-->
     <property name="hibernate.c3p0.max_size">5</property>
        <property name="hibernate.c3p0.min_size">1</property>
        <property name="hibernate.c3p0.timeout">15000</property>
        <property name="hibernate.c3p0.max_statements">100</property>
        <property name="hibernate.c3p0.validate">true</property>

_________________
Ricardo Lecheta


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 8:29 am 
Regular
Regular

Joined: Tue Oct 14, 2003 11:11 pm
Posts: 62
Location: Brasil/Curitiba
I'm using Hibernate 2.0.1

_________________
Ricardo Lecheta


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 8:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try using a recent version of hibernate and c3p0


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 8:51 am 
Regular
Regular

Joined: Tue Oct 14, 2003 11:11 pm
Posts: 62
Location: Brasil/Curitiba
gloeglm wrote:
Try using a recent version of hibernate and c3p0


ok, I'll try it. But when I've tested other application whith Hibernate 2.1.2 the cglib error: java.lang.IllegalAccessError is still happening with me.
I'm using Hibernate 2.0.1 because I coundn't use Hibernate 2.1 without this error...

I've already read the faq: http://www.hibernate.org/74.html,

Hibernate 2.1.2 already fixed this bug? does it contain the last cglib distribution ?

And about the c3p0 configuration, is it correct?

thanks.

_________________
Ricardo Lecheta


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 8:52 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Just try it.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 10:29 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
upgrade cglib and ASM if you have this problem, I do not see the stack trace but I think it is caused by incompatable ASM and cglib versions.
See stack trace, if you see ASM classes in stack, it means cglib can not access some field or method in ASM library (it is changed from public to private)

Ricardo wrote:
gloeglm wrote:
Try using a recent version of hibernate and c3p0


ok, I'll try it. But when I've tested other application whith Hibernate 2.1.2 the cglib error: java.lang.IllegalAccessError is still happening with me.
I'm using Hibernate 2.0.1 because I coundn't use Hibernate 2.1 without this error...

I've already read the faq: http://www.hibernate.org/74.html,

Hibernate 2.1.2 already fixed this bug? does it contain the last cglib distribution ?

And about the c3p0 configuration, is it correct?

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 1:42 pm 
Regular
Regular

Joined: Tue Oct 14, 2003 11:11 pm
Posts: 62
Location: Brasil/Curitiba
I've updated my application to Hibernate 2.1.2 and cglib 2.0 final. The application is working fine without errors :-)

But my original problem was with c3p0 connection pool, I'll analise my application to see if the "Connection reset by peer: socket write error" error was fixed in Hibernate 2.1.2....

thanks

_________________
Ricardo Lecheta


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 5:19 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
Ricardo wrote:
But my original problem was with c3p0 connection pool, I'll analise my application to see if the "Connection reset by peer: socket write error" error was fixed in Hibernate 2.1.2....


Try Proxool instead - it is very stable and gives you far more information about what is going on - maybe it will help you to find out where your problem comes from (if it is related to the connection usage)

You can find more information at http://proxool.sourceforge.net


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 6:14 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
we're using DBCP in production, it works fine...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 11:31 pm 
Newbie

Joined: Tue Mar 02, 2004 7:25 am
Posts: 3
thank you guys,

I found the problem, I was opening a transaction and I wasn


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 5:14 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
delpouve wrote:
we're using DBCP in production, it works fine...


Although you don't have any problem with DBCP, I would suggest you have a look at the following thread http://forum.hibernate.org/viewtopic.php?t=10

Maybe you will change your mind :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 6:30 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
thanks brenuart

there were problems with JCScache and now it is unused because of these problems.
If dbcp is "buggy" why can it still be used? i think there is a risk, it is planned to remove dbcp from the package?

Is proxool 100% free?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 6:47 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
delpouve wrote:
If dbcp is "buggy" why can it still be used? i think there is a risk, it is planned to remove dbcp from the package?


Many people have reported problems using DBCP (memory and connection leaks).

Remove DBCP from the package - which one ? Hibernate? I see no reason why Hibernate should drop support for DBCP because it may be buggy somehow...


delpouve wrote:
Is proxool 100% free?


Yes it is! Have a look - very easy to configure and runs like a charm :)
They also have a nice AdminServlet that let you see how many connections are used at any time... might be usefull in some cases.

Bill Horsman (Proxool maintainer) said a DataSource implementation will be available soon. So it could be configured from within Tomcat or any other app server.

As far as I can tell, Proxool does have all (major) features of DBCP except the statement pooling. This doesn't appear to be an issue since most JDBC driver (from major vendor) implement this feature inside their driver...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 11:00 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
maybe it could usefull to warn the users (on the doc for example) that some of the other tool given with the hibernate package (/lib) are not 100% ok.
I mean, i thought dbcp was ok and you show me it was not, and of course i'll will use proxool now.

Thanks again brenuart, we have another app to put on production and this one will stress the pool... i'm going to use proxool


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 14 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.