Hello guys. This is version 10.0.26 and we are experiencing some issues. Here is the scenario. We have a cronjob trigger process. Internally, call to a service class is executed:
final ExecutorService executorService = Executors.newWorkStealingPool();
final IvyAsyncRunner ivyAsyncRunner = new IvyAsyncRunner();
Several runners are started. Such a runner usually do http calls and quite lot of db read/writes operations. At a certain point of time of the the execution flow of one of these runners an exception occurs -
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
at IvyProjectClassLoader [pmv=.....,generation=0]//com.axonivy.persistence.dao.GenericDAO.mergeBean(GenericDAO.java:1090)
at IvyProjectClassLoader [pmv=......,generation=0]//com.axonivy.persistence.dao.GenericDAO.save(GenericDAO.java:976)
Caused by: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:111)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:138)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:276)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:284)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:246)
at org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:83)
at IvyProjectClassLoader [pmv=......,generation=0]//com.axonivy.persistence.dao.AbstractDAO$ManagedTransaction.begin(AbstractDAO.java:228)
at IvyProjectClassLoader [pmv=.......,generation=0]//com.axonivy.persistence.dao.AbstractDAO.beginTransaction(AbstractDAO.java:129)
at IvyProjectClassLoader [pmv=........,generation=0]//com.axonivy.persistence.dao.GenericDAO.mergeBean(GenericDAO.java:1036)
... 29 more
Caused by: java.sql.SQLException
at ch.ivyteam.ivy.db.internal.ExternalDatabase.getConnection(ExternalDatabase.java:283)
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:38)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:108)
... 37 more
Caused by: java.util.EmptyStackException
at ch.ivyteam.util.threadcontext.IvyThreadLocalStack.pop(IvyThreadLocalStack.java:63)
at ch.ivyteam.ivy.security.internal.SecurityExecutionContext.pop(SecurityExecutionContext.java:64)
at ch.ivyteam.ivy.security.internal.SecurityExecutionContext.popContext(SecurityExecutionContext.java:29)
at ch.ivyteam.util.callable.AbstractExecutionContext.callInContext(AbstractExecutionContext.java:12)
at ch.ivyteam.ivy.security.exec.Sudo.call(Sudo.java:69)
at ch.ivyteam.ivy.db.internal.ExternalDatabase.getConnection(ExternalDatabase.java:279)
This exception happened after many db interaction. It is caught, but the problem is that this task doesn't finish its work and even more - any other operation seems to be blocked further. Any idea what could cause such a behaviour?
Regards, Milena