错误启动发生在过去的五天里,以前从未发生过,Camunda Spring-Boot-Starter版本是3.5.5。
ENGINE-16004 Exception while closing command context:
### Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: Error preparing statement. Cause: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Job.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
### The error occurred while executing a query
### SQL: SELECT SUB.* FROM ( select RES.* , row_number() over (ORDER BY RES.ID_ asc) rnk FROM ( select distinct RES.* from ACT_RU_JOB RES where (RES.RETRIES_ > 0) and ( RES.DUEDATE_ is null or RES.DUEDATE_ <= ? ) and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ < ?) and RES.SUSPENSION_STATE_ = 1 and ( ( RES.EXCLUSIVE_ = 1 and not exists( select J2.* from ACT_RU_JOB J2 where J2.PROCESS_INSTANCE_ID_ = RES.PROCESS_INSTANCE_ID_ -- from the same proc. inst. and (J2.EXCLUSIVE_ = 1)
-- also exclusive and (J2.LOCK_OWNER_ is not null and J2.LOCK_EXP_TIME_ >= ?) -- in progress ) ) or RES.EXCLUSIVE_ = 0 ) )RES ) SUB WHERE SUB.rnk >= ? AND SUB.rnk < ? ORDER BY SUB.rnk
### Cause: org.apache.ibatis.executor.ExecutorException: Error preparing statement. Cause: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection.
有谁能帮帮忙吗?
2条答案
按热度按时间bttbmeg01#
You Spring Boot Starter版本表明您使用的是相当过时的Camunda发行版。升级,还需要相关的安全补丁。
有比您共享的代码片段更长的错误吗?*“Unable to Obtain JDBC Connection.”*可能意味着您的连接池的连接数已用完。您表示它以前运行得很好。最近该系统的使用率增加了吗?然后,您可能需要增加连接池大小。
(我不建议将嵌入式H2数据库用于任何类似生产的场景。给E.E.G.一个PostgreSQL)
t1rydlwq2#
以下是完整的例外消息:
查询数据库错误。原因:org.apache.ibati.ecutor.ExecutorException:准备语句时出错。原因:org.hibernate.exception.JDBCConnectionException:无法获取jdbc连接
org/camunda/bpm/engine/impl/mapping/entity/Job.xml中可能存在错误
错误可能涉及org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
执行查询时出错
SQL:SELECT SUBFROM(SELECT RES.,ROW_NUMBER()OVER(ORDER BY RES.ID_ASC)RNK FROM(SELECT DISTINCT RES.*FROM ACT_RU_JOB RES WHERE(RES.RETRIES_>0)AND(RES.DUEDATE_IS NULL或RES.DUEDATE_<=?)AND(RES.LOCK_OWNER_IS NULL或RES.LOCK_EXP_TIME_<?)和RES.SUSPENSION_STATE_=1 AND(RES.EXCLUSIVE_=1 AND NOT EXISTS(SELECT J2.*FROM ACT_RU_JOB J2 WHERE J2.PROCESS_INSTANCE_ID_=RES.PROCESS_INSTANCE_ID_-来自同一进程。安装AND(J2.EXCLUSIVE_=1)--也是异与(J2.LOCK_OWNER_IS NOT NULL AND J2.LOCK_EXP_TIME_>=?)--正在进行中))或RES.EXCLUSIVE_=0))RES)SUB WHERE SUB.rnk>=?和SUB.rnk<?按子对象排序rnk
原因:org.apache.ibati.ecutor.ExecutorException:准备语句出错。原因:org.hibernate.exception.JDBCConnectionException:无法获取jdbc连接
异常:Hikari-连接不可用,30000ms后请求超时。At com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:695)at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)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:104)...41公共帧被省略 Package :org.hibernate.exception.JDBCConnectionException:无法在org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:48)获取jdbc连接位于org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)位于org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)位于org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)位于Org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:107)at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:134)at org.hibernate.internal.SessionImpl.connection(SessionImpl.java:470)at jdk.internal.reflect.GeneratedMethodAccessor458.invoke(Unknown源代码)at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown源代码)at java.lang.refect.Method.Invoke(未知源)at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)at org。Springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:266)at org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle.doGetConnection(HibernateJpaDialect.java:430)at org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle.getConnection(HibernateJpaDialect.java:419)at org.springframework.jdbc.datasource.ConnectionHolder.getConnection(ConnectionHolder.java:162)at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:226)at com.sun.Proxy。$Proxy210.preparareStatement(未知源)在org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:87)的org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)...26个公共帧被省略, Package 者:org.apache.ibati.ecutor.ExecutorException:准备语句时出错。原因:org.hibernate.exception.JDBCConnectionException:无法在org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:97)、org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59)、org.apache.ibatis.executor.BatchExecutor.doQuery(BatchExecutor.java:91)、org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)、org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)、org.apache.ibatis获取jdbc连接。.executor.CachingExecutor.query(CachingExecutor.java:109)at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)...省略了19个常见帧的 Package 者:org.apache.ibatis.exceptions.PersistenceException:
查询数据库错误。原因:org.apache.ibati.ecutor.ExecutorException:准备语句时出错。原因:org.hibernate.exception.JDBCConnectionException:无法获取jdbc连接
org/camunda/bpm/engine/impl/mapping/entity/Job.xml中可能存在错误
错误可能涉及org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
执行查询时出错
SQL:SELECT SUBFROM(SELECT RES.,ROW_NUMBER()OVER(ORDER BY RES.ID_ASC)RNK FROM(SELECT DISTINCT RES.*FROM ACT_RU_JOB RES WHERE(RES.RETRIES_>0)AND(RES.DUEDATE_IS NULL或RES.DUEDATE_<=?)AND(RES.LOCK_OWNER_IS NULL或RES.LOCK_EXP_TIME_<?)和RES.SUSPENSION_STATE_=1 AND(RES.EXCLUSIVE_=1 AND NOT EXISTS(SELECT J2.*FROM ACT_RU_JOB J2 WHERE J2.PROCESS_INSTANCE_ID_=RES.PROCESS_INSTANCE_ID_-来自同一进程。安装AND(J2.EXCLUSIVE_=1)--也是异与(J2.LOCK_OWNER_IS NOT NULL AND J2.LOCK_EXP_TIME_>=?)--正在进行中))或RES.EXCLUSIVE_=0))RES)SUB WHERE SUB.rnk>=?和SUB.rnk<?按子对象排序rnk
原因:org.apache.ibati.ecutor.ExecutorException:准备语句出错。原因:org.hibernate.exception.JDBCConnectionException:无法获取jdbc连接
Е他的工作量最近没有增加到什么程度。而且我们在 Spring 酒店没有任何cunda的数据库设置。