Details

      Description

      The datasource is deactivated before the activiti workflow is deactivated would be a probable explanation of this error

      SEVERE: exception during job acquisition: 
      ### Error querying database.  Cause: java.lang.NullPointerException
      ### The error may exist in org/activiti/db/mapping/entity/Job.xml
      ### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
      ### The error occurred while executing a query
      ### Cause: java.lang.NullPointerException
      org.apache.ibatis.exceptions.PersistenceException: 
      ### Error querying database.  Cause: java.lang.NullPointerException
      ### The error may exist in org/activiti/db/mapping/entity/Job.xml
      ### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
      ### The error occurred while executing a query
      ### Cause: java.lang.NullPointerException
      at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
      at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
      at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
      at org.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:305)
      at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:296)
      at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:291)
      at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:278)
      at org.activiti.engine.impl.persistence.entity.JobEntityManager.findNextJobsToExecute(JobEntityManager.java:104)
      at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:48)
      at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:33)
      at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
      at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
      at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
      at org.activiti.engine.impl.interceptor.RetryInterceptor.execute(RetryInterceptor.java:49)
      at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
      at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
      at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:59)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
      at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.getDataSource(JDBCDataSourceService.java:270)
      at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.getConnection(ActivitiDataSourceProxy.java:120)
      at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131)
      at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58)
      at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:271)
      at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:69)
      at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:56)
      at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
      at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
      at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
      at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
      at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
      ... 16 more
      
      

       

      From the debugger, the JDBC datasource is already deactivated when activiti workflow attempts to access it.

      Breakpoint reached at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.getConnection(ActivitiDataSourceProxy.java:120)
      Breakpoint reached at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.getDataSource(JDBCDataSourceService.java:270)
      Breakpoint reached at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.getConnection(ActivitiDataSourceProxy.java:120)
      Breakpoint reached at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.getDataSource(JDBCDataSourceService.java:270)
      Breakpoint reached at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.getConnection(ActivitiDataSourceProxy.java:120)
      Breakpoint reached at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.getDataSource(JDBCDataSourceService.java:270)
      Breakpoint reached at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.getConnection(ActivitiDataSourceProxy.java:120)
      Breakpoint reached at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.getDataSource(JDBCDataSourceService.java:270)
      Breakpoint reached at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.deactivate(ActivitiDataSourceProxy.java:115)
      Breakpoint reached at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.unbindDataSourceService(ActivitiDataSourceProxy.java:95)
      Breakpoint reached at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.deactivate(JDBCDataSourceService.java:220)
      Breakpoint reached at org.forgerock.openidm.workflow.activiti.impl.datasource.ActivitiDataSourceProxy.getConnection(ActivitiDataSourceProxy.java:120)
      Breakpoint reached at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.getDataSource(JDBCDataSourceService.java:270)

        Attachments

          Activity

            People

            • Assignee:
              patrickdiligent patrick diligent
              Reporter:
              patrickdiligent patrick diligent
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: