Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-8004

Job executor is not able to acquire a job when more than 1000 deployments registered

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      1. more than 1000 deployments are registered
      2. "jobExecutorDeploymentAware" configuration option is set to true
      3. Oracle database is in use
      4. Job executor tries to acquire a job in background thread (SequentialJobAcquisitionRunnable.acquireJobs)

      Current result:
      job acquisition fails with exception:

      2017-07-05 09:13:42,699 [ERROR] org.camunda.bpm.engine.context:156 - ENGINE-16004 Exception while closing command context: 
      ### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      
      ### 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-Inline
      ### The error occurred while setting parameters
      ### SQL: select * from ( select a.*, ROWNUM rnum from (     select       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.DEPLOYMENT_ID_ is null                     or           RES.DEPLOYMENT_ID_ in           (              ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           )                    )                     ) a where ROWNUM < ?) where rnum  >= ?
      ### Cause: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      
      org.apache.ibatis.exceptions.PersistenceException: 
      ### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      
      ### 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-Inline
      ### The error occurred while setting parameters
      ### SQL: select * from ( select a.*, ROWNUM rnum from (     select       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.DEPLOYMENT_ID_ is null                     or           RES.DEPLOYMENT_ID_ in           (              ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           ,             ?           )                    )                     ) a where ROWNUM < ?) where rnum  >= ?
      ### Cause: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:87) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(DbEntityManager.java:171) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:163) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:159) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:144) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.persistence.entity.JobManager.findNextJobsToExecute(JobManager.java:195) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:57) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:37) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104) [camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66) [camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) [camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.acquireJobs(SequentialJobAcquisitionRunnable.java:138) [camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.run(SequentialJobAcquisitionRunnable.java:61) [camunda-engine-7.5.0.jar:7.5.0]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]
      Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3685) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1376) ~[ojdbc6-11.2.0.3.jar:11.2.0.3.0]
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:59) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:60) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77) ~[mybatis-3.2.8.jar:3.2.8]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108) ~[mybatis-3.2.8.jar:3.2.8]
      	... 16 more
      2017-07-05 09:13:42,703 [ERROR] org.camunda.bpm.engine.jobexecutor:156 - ENGINE-14019 Exception during job acquisition Process engine persistence exception
      org.camunda.bpm.engine.ProcessEngineException: Process engine persistence exception
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.rethrow(CommandInvocationContext.java:60) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:291) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.acquireJobs(SequentialJobAcquisitionRunnable.java:138) ~[camunda-engine-7.5.0.jar:7.5.0]
      	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.run(SequentialJobAcquisitionRunnable.java:61) [camunda-engine-7.5.0.jar:7.5.0]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]
      Caused by: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      

      Expected result:
      no errors are shown in log, job acquisition succeeds

      Hints:
      We can try to split the list of deploymentIds in several lists with length <=1000 and combine it with OR in SQL. So that in SQL
      IN(1, ..., 1000, ..., 1500)
      will be replaced by
      IN(1, ..., 1000) or IN(1001, ... 1500)

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              svetlana.dorokhova Svetlana Dorokhova
              svetlana.dorokhova Svetlana Dorokhova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce