Skip to main content

org.hibernate.exception.JDBCConnectionException: could not execute query

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
madhukar_vishal
Offline
Joined: 2012-08-17

Hi Glassfish Experts,
We have been facing problem in our Production environment where we have to restart our Glassfish server every altenate day due to the slow performance and hanging og teh GUI application which runs on Glassfish.

The exceptions which we see in the log is something like mentioned below. There is no problem with the database and network connectivity. The threads on the DB side is also configured to the optimum value.

******************

2012-07-24 11:56:38.179 ERROR [http-thread-pool-8443(3)][de.iccs.web.interceptors.ErrorInterceptor.intercept()] Error
Interceptor
org.hibernate.exception.JDBCConnectionException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:99)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2536)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890)
at de.iccs.web.actions.ShowSearchResultAction.execute(ShowSearchResultAction.java:89)
at sun.reflect.GeneratedMethodAccessor5843.invoke(Unknown Source)

at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: Io exception: Socket read timed out
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:197)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:566)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:802)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1203)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
... 71 more
Caused by: oracle.net.ns.NetException: Socket read timed out
at oracle.net.ns.Packet.receive(Packet.java:249)
*****************

Please help.

Thanks,
Madhukar.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mvatkina
Offline
Joined: 2005-04-04

Do you have database connection validation enabled in GlassFish resources?

forums@java.net wrote:
> Hi Glassfish Experts, We have been facing problem in our Production
> environment where we have to restart our Glassfish server every
> altenate day
> due to the slow performance and hanging og teh GUI application which
> runs on
> Glassfish. The exceptions which we see in the log is something like
> mentioned
> below. There is no problem with the database and network connectivity.
> The
> threads on the DB side is also configured to the optimum value.
> ****************** 2012-07-24 11:56:38.179 ERROR
> [http-thread-pool-8443(3)][de.iccs.web.interceptors.ErrorInterceptor.intercept()]
>
> Error Interceptor org.hibernate.exception.JDBCConnectionException:
> could not
> execute query at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:99)
>
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
>
> at org.hibernate.loader.Loader.doList(Loader.java:2536) at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at
> org.hibernate.loader.Loader.list(Loader.java:2271) at
> org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452) at
> org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
>
> at
> org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
>
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) at
> org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at
> org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890)
>
> at
> de.iccs.web.actions.ShowSearchResultAction.execute(ShowSearchResultAction.java:89)
>
> at sun.reflect.GeneratedMethodAccessor5843.invoke(Unknown Source) at
> java.lang.Thread.run(Thread.java:662) Caused by:
> java.sql.SQLException: Io
> exception: Socket read timed out at
> oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
>
> at
> oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:197)
>
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
>
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:566)
>
> at
> oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:802)
>
> at
> oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
>
> at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
>
> at
> oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
>
> at
> oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
>
> at
> oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1203)
>
> at
> org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
> at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) at
> org.hibernate.loader.Loader.doQuery(Loader.java:802) at
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
>
> at org.hibernate.loader.Loader.doList(Loader.java:2533) ... 71 more
> Caused
> by: oracle.net.ns.NetException: Socket read timed out at
> oracle.net.ns.Packet.receive(Packet.java:249) ***************** Please
> help.
> Thanks, Madhukar.
>
> --
>
> [Message sent by forum member 'madhukar_vishal']
>
> View Post: http://forums.java.net/node/889472
>
>