Not able to proceed getting java.sql.SQLRecoverableException: Closed Connection
Issue
- We are doing jBPM integration with FINACLE for that we are testing several scenarios(exp : Start Process,Start Task ..). In one case we got following exception.
- After that we can not proceed with our testing. Once we done server jboss-eap-6.1.1 restart then everything goes fine.
16:46:39,595 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (pool-23-thread-1) SQL Error: 17008, SQLState: 08003
16:46:39,595 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (pool-23-thread-1) Closed Connection
16:46:39,595 WARN [org.jbpm.shared.services.impl.TransactionalCommandService] (pool-23-thread-1) Could not commit session: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not prepare statement
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) [hibernate-entitymanager-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) [hibernate-entitymanager-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:312) [hibernate-entitymanager-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.jbpm.shared.services.impl.JpaPersistenceContext.queryStringWithParameters(JpaPersistenceContext.java:151) [jbpm-shared-services-6.0.2-redhat-6.jar:6.0.2-redhat-6]
at org.jbpm.shared.services.impl.JpaPersistenceContext.queryAndLockWithParametersInTransaction(JpaPersistenceContext.java:37) [jbpm-shared-services-6.0.2-redhat-6.jar:6.0.2-redhat-6]
at org.jbpm.executor.impl.ExecutorQueryServiceImpl$LockAndUpdateRequestInfoCommand.execute(ExecutorQueryServiceImpl.java:217) [jbpm-executor-6.0.2-redhat-6.jar:6.0.2-redhat-6]
at org.jbpm.executor.impl.ExecutorQueryServiceImpl$LockAndUpdateRequestInfoCommand.execute(ExecutorQueryServiceImpl.java:204) [jbpm-executor-6.0.2-redhat-6.jar:6.0.2-redhat-6]
at org.jbpm.shared.services.impl.TransactionalCommandService.execute(TransactionalCommandService.java:38) [jbpm-shared-services-6.0.2-redhat-6.jar:6.0.2-redhat-6]
at org.jbpm.executor.impl.ExecutorQueryServiceImpl.getRequestForProcessing(ExecutorQueryServiceImpl.java:199) [jbpm-executor-6.0.2-redhat-6.jar:6.0.2-redhat-6]
at org.jbpm.executor.impl.ExecutorRunnable.run(ExecutorRunnable.java:83) [jbpm-executor-6.0.2-redhat-6.jar:6.0.2-redhat-6]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482) [rt.jar:1.7.0]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:362) [rt.jar:1.7.0]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:189) [rt.jar:1.7.0]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:189) [rt.jar:1.7.0]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614) [rt.jar:1.7.0]
at java.lang.Thread.run(Thread.java:777) [vm.jar:1.7.0]
Caused by: org.hibernate.exception.JDBCConnectionException: could not prepare statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:188) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:159) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1854) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1831) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1811) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.doQuery(Loader.java:899) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.doList(Loader.java:2516) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.doList(Loader.java:2502) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2332) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.Loader.list(Loader.java:2327) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:490) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1269) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:283) [hibernate-entitymanager-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
... 15 more
Caused by: java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3560) [ojdbc6.jar:11.2.0.3.0]
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:738)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:724)
at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:405)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:161) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1]
... 31 more
-
What can be the solution for this issue? Every time server restart is not possible.
-
The issue occurred in when only 4 users are logged into JBPM. So it is not a high load scenario,
- In Finacle usually we look for 100s of users logged in at the same time . So please share the formula to calculate the pool to be configured with respect to number of JBPM users.
- Further would like to know that How to identify if the configured connections are exhausted or not?
- Please let us know how many connections will be blocked by JBPM for one JBPM user.
- Where to configure connection pool size in JBOSS?
Environment
- Red Hat JBoss BPM Suite
- 6.0.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
