• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hung thread while conn.preparecall  RSS feed

anand san
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a web application , in which we make lot of stored procedure calls.
We use hibernate to make DB connections, and use below to call stored procedure.

Connection connection =  session.connection();   // I know it is old and deprecated, but error is not thrown at this line.
CallableStatement cstmt = connection.prepareCall("{call storedProcedureName(?)}");

It normally works fine, but some times it throws hung thread exception and when i see error stack trace, it leads me to above mentioned prepareCall line.
Last line at error stack trace it:

at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:196)
at com.ibm.ejs.j2c.FreePool.queueRequest(FreePool.java:437)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1343)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3874)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3094)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1548)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1031)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:644)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:920)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:66)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:50)
at com.sun.proxy.$Proxy39.prepareCall(Unknown Source)

Can anyone help me to identify exact issue here?
Knute Snortum
Posts: 4288
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the full error and stacktrace?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!