1

I am trying to execute a SQL job of Copying data from within Database tables. DB server is Oracle 12c. Not able to figure out the probable cause of the below exception :

Caused by: java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:571)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:204)
at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:321)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:553)
at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:238)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632)

Caused by: java.sql.SQLException: [Oracle JDBC Driver]Object has been closed.
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask.run(GooGooStatementCache.java:547)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

I tried following this thread "error-occured-while-trying-to-acquire-a-cached-preparedstatement-in-a-background" . But we checked that nobody closed the connection and if its getting closed by itself. We also verified if the DB network was loaded due to some reason but found none.

Appreciate for any suggestion that could help us how to get around this exception to find the root cause of it.

Tad Harrison
  • 1,258
  • 5
  • 9
Arpit
  • 53
  • 1
  • 6

0 Answers0