-->
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.  [ 4 posts ] 
Author Message
 Post subject: weird C3P0-TRAVIS error
PostPosted: Mon Mar 28, 2005 3:45 pm 
Beginner
Beginner

Joined: Sun May 02, 2004 8:04 am
Posts: 36
Hi,

I'm using latest Hibernate 2.X in my web application development. I'm noticing every now and then weird errors in my log file

Code:
c3p0-TRAVIS: An idle resource is broken and must be purged.
c3p0-TRAVIS: java.sql.SQLException: Connection is invalid
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.refurbishResource(C3P0PooledConnectionPool.java:141)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.refurbishIdleResource(C3P0PooledConnectionPool.java:105)
        at com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.run(BasicResourcePool.java:1105)
        at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:148)


What does this mean, and what can I do to fix it?

Thanks, Jason


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 28, 2005 3:54 pm 
Regular
Regular

Joined: Thu Apr 15, 2004 1:12 pm
Posts: 55
I get that, too, and have not clue what it's about... :-/ So I will be interested in the answer as well!

For me, this doesn't seem to be in response to any event... it just pops up all of a sudden when nothing else seems to be going on.

Do you also see one like this?:

java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.SocketException: Address already in use
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1719)
at com.mysql.jdbc.Connection.<init>(Connection.java:432)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at com.mchange.v2.c3p0.impl.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:138)
at com.mchange.v2.c3p0.impl.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:235)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.acquireResource(C3P0PooledConnectionPool.java:65)
at com.mchange.v2.resourcepool.BasicResourcePool.assimilateResource(BasicResourcePool.java:721)
at com.mchange.v2.resourcepool.BasicResourcePool.acquireUntil(BasicResourcePool.java:502)
at com.mchange.v2.resourcepool.BasicResourcePool.access$000(BasicResourcePool.java:34)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:903)
at com.mchange.v2.async.CarefulRunnableQueue$TaskThread.run(CarefulRunnableQueue.java:145)

—ml—


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 29, 2005 12:32 am 
C3P0 Developer
C3P0 Developer

Joined: Tue Jan 06, 2004 8:58 pm
Posts: 145
> c3p0-TRAVIS: An idle resource is broken and must be purged.
> c3p0-TRAVIS: java.sql.SQLException: Connection is invalid
>         at
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.refurbishResource(C3P0PooledConnectionPool.java:141)
>        at
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.refurbishIdleResource(C3P0PooledConnectionPool.java:105)
>        at
> com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.run(BasicResourcePool.java:1105)
>        at
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:148)

Hi. This message simply means that c3p0 was configured to periodically test idle Connections, and during such a test, it found that one was broken, and removed it from the pool. It is nothing to worry about -- if it never happened, there'd be no need for Connection testing at all.

It says "c3p0-TRAVIS" only for the embarrassing reason that sometimes when I work with users to track down a problem, I add their names to log messages I think will be relevant to the issue, so that they can easily grep for the relevant info. Apparently several messages still annotated with Travis' name slipped into a public release... Embarrassing for me, but nothing to worry about.

(The message gives very little information about how the Connection actually failed... I'll try to make it a bit more informative.)

Anyway, more recent versions of c3p0 leave Travis' name out of it... the next prerelease of c3p0 (0.9.0-pre4) will include more about the observed Connection failure in the message.

smiles,
Steve (c3p0 guy)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 29, 2005 2:26 am 
Beginner
Beginner

Joined: Sun May 02, 2004 8:04 am
Posts: 36
Great-- nothing nothing like getting a questioned answered from the source developer! Thanks for the info-- nothing bad seems to happen with the DB so it didn't seem like anything fatal.

Thanks, Jason


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