Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8938095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:32:49+00:00 2026-06-15T10:32:49+00:00

I’m using Hibernate 4 with C3P0 as its connection provider. I’m currently not using

  • 0

I’m using Hibernate 4 with C3P0 as its connection provider. I’m currently not using
Spring framework.

Dev Environment

Windows 7
Eclipse Juno
JRE-7
JDK -7

jars Im using are…

hibernate-core-4.1.7.Final.jar
c3p0-0.9.2-pre6.jar
jtds-1.3.0.jar

but in the same lib path there are also

hibernate-c3p0-4.1.1.Final.jar
spring-orm-3.2.0.RC1.jar

Is there any chance those other jars(hibernate-c3p0-4.1.1.Final.jar and spring-orm-3.2.0.RC1.jar) might have had some effect on this error (see below) ??

And yes the whole spring framework jars are in the path but I’m just trying to
get used to hibernate first. I don’t really know how to use Spring yet. Let’s leave that matter here for now.

I can create connections and query successfully against the database.
But I get this error

something like

Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@4d0106e5

and

WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@4d0106e5

The errors I get are pretty repetitive.
They all look like this

11월 30, 2012 4:39:59 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:39:59 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:39:59 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@4d0106e5
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@4d0106e5
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:17 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:17 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:17 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@40a4d015
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@40a4d015
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:17 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:17 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:17 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@2ee657fa
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@2ee657fa
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:18 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:18 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:18 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@51b2f91b
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@51b2f91b
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:19 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:19 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:19 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@7bb39e5e
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@7bb39e5e
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:21 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:21 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:21 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@155767ad
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@155767ad
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:22 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:22 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:22 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@299bdc58
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@299bdc58
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:22 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:22 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:22 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@550a9854
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@550a9854
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

11월 30, 2012 4:42:22 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.
11월 30, 2012 4:42:22 오후 com.mchange.v2.c3p0.impl.NewPooledConnection logCloseExceptions
INFO: [c3p0] NewPooledConnection close Exception.
java.sql.SQLException: I/O Error: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2388)
    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:736)
    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:718)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:592)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Caused by: java.io.IOException: Stream 2 attempting to read when no request has been sent
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:755)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2282)
    ... 9 more

11월 30, 2012 4:42:22 오후 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask run
WARNING: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@67a80f8e
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@67a80f8e
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:638)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)

Thanks in advance.
Let me know if there are few points I can improve writing a question : )

EDIT
Oops I forgot to paste my config. Here goes

<hibernate-configuration>

<session-factory>

 <!-- Database connection settings -->
 <property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
 <!--  -->

 <!-- JDBC connection pool (use the built-in) -->
 <property name="connection.pool_size">5</property>

 <!-- connection pooling -->

        <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
        <!-- 
        <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>        
         -->
        <property name="hibernate.c3p0.acquire_increment" >1</property>
        <property name="hibernate.c3p0.idle_test_period">30</property>
        <property name="hibernate.c3p0.min_size">1</property>
        <property name="hibernate.c3p0.max_size">2</property>
        <property name="hibernate.c3p0.max_statements">50</property>
        <property name="hibernate.c3p0.timeout">60</property>

        <!-- 
        <property name="hibernate.c3p0.acquireRetryAttempts">1</property>
        <property name="hibernate.c3p0.acquireRetryDelay">250</property>
         -->

 <!-- SQL dialect -->
 <!--  
 <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
 -->

 <!-- Enable Hibernate's automatic session context management -->
 <property name="current_session_context_class">thread</property>

 <!-- Disable the second-level cache -->
 <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

 <!-- Echo all executed SQL to stdout -->
 <property name="show_sql">true</property>

 <!-- Drop and re-create the database schema on startup -->
 <!-- <property name="hbm2ddl.auto">update</property> -->

 <!-- Mapping files -->
 <mapping resource="standard.hbm.xml"/>
 <mapping resource="revisionedFile.hbm.xml"/>
 <mapping resource="keyword.hbm.xml"/>  
 <mapping resource="device.hbm.xml"/>
 <mapping resource="reference.hbm.xml"/>
 <mapping resource="commonSpecification.hbm.xml"/>
 <mapping resource="item.hbm.xml"/>
 <mapping resource="superItem.hbm.xml"/>
 <mapping resource="defaultURLResource.hbm.xml" />
 <mapping resource="test.hbm.xml"/>

  <!--  Enver Listeners -->
   <listener class="org.hibernate.envers.event.AuditEventListener" type="post-insert"/>
   <listener class="org.hibernate.envers.event.AuditEventListener" type="post-update"/>
   <listener class="org.hibernate.envers.event.AuditEventListener" type="post-delete"/>
   <listener class="org.hibernate.envers.event.AuditEventListener" type="pre-collection-update"/>
   <listener class="org.hibernate.envers.event.AuditEventListener" type="pre-collection-remove"/>
   <listener class="org.hibernate.envers.event.AuditEventListener" type="post-collection-recreate"/>


</session-factory>

</hibernate-configuration>  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:32:50+00:00Added an answer on June 15, 2026 at 10:32 am

    i don’t know exactly why you are seeing the Exceptions, but they are Exceptions where c3p0 is cleaning up Statements that ought to have been closed by the user but were not. one way to address the issue (which would either solve the problem or give you cleaner information about where the problem occurs) would be to make sure that your client application closes Statements promptly after it uses them. c3p0 is careful to clean up unclosed Statements for you when you check in Connections (or in this case, when a PooledConnection is being removed from the pool), but if Exceptions occur when it does, they will be reported as an Exception during resource-cleanup, i.e. during close(). that’s what you are seeing.

    it’s a bit of a mystery how/why you have uncached Statements remaining to be closed while the PooledConnection is being destroyed. the pool shouldn’t try to close() a PooledConnection while it is checked out, and if it has been checked in, the Statements ought to have been cleaned up on check-in. i’ll add a bit more logging (at FINER/DEBUG level) to the logger com.mchange.v2.c3p0.impl.NewPooledConnection to the next pre-release of c3p0 that might help to track this issue down. please do give it a look if you get a chance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am currently running into a problem where an element is coming back from
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.