cancel
Showing results for 
Search instead for 
Did you mean: 

Problem - Table ACT_RE_PROCDEF not found

waldi666
Champ in-the-making
Champ in-the-making
Hi,

i am running aciviti in version 5.7 with spring integration and inmemory h2 database access. The application starts fine -
the activiti engine runs up without errors. I can use the application for a while without problems, the workflow will be
executed without problems.

After a time the activiti engine runs in a PersistenceException: 
——————————————————————————–
5219571 [qtp18481629-28] INFO  de.xxx.ActivitiWorkflowManager - Starting workflow: cfg_wfm_001.bpmn20.xml
5219806 [qtp18481629-28] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLException: Table "ACT_RE_PROCDEF" not found; SQL statement:
select PD.*
      
    from ACT_RE_PROCDEF PD
     WHERE  PD.KEY_ = ? [42102-160]
### The error may exist in org/activiti/db/mapping/entity/ProcessDefinition.xml
### The error may involve org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity.selectProcessDefinitionsByQueryCriteria
### The error occurred while executing a query
### SQL: select PD.*             from ACT_RE_PROCDEF PD      WHERE  PD.KEY_ = ?
### Cause: org.h2.jdbc.JdbcSQLException: Table "ACT_RE_PROCDEF" not found; SQL statement:
select PD.*
      
    from ACT_RE_PROCDEF PD
     WHERE  PD.KEY_ = ? [42102-160]
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
——————————————————————————–

What can be happen ?

My activit context configuration file:
——————————————————————————–
   <tx:annotation-driven transaction-manager="transactionManager" />

   <!– In-memory database for now –>
   <bean id="dataSource"
      class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
      <property name="targetDataSource">
         <bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
            <property name="driverClass" value="org.h2.Driver" />
            <property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
            <property name="username" value="sa" />
            <property name="password" value="" />
         </bean>
      </property>
   </bean>

   <bean id="transactionManager"
      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource" />
   </bean>

   <bean id="activitiProcessEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="databaseType" value="h2" />
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="false" />
   </bean>

   <bean id="activitiProcessEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
      <property name="processEngineConfiguration" ref="activitiProcessEngineConfiguration" />
   </bean>

   <bean id="activitiRepositoryService" factory-bean="activitiProcessEngine"
      factory-method="getRepositoryService" />
   <bean id="activitiRuntimeService" factory-bean="activitiProcessEngine"
      factory-method="getRuntimeService" />
   <bean id="activitiTaskService" factory-bean="activitiProcessEngine"
      factory-method="getTaskService" />
   <bean id="activitiHistoryService" factory-bean="activitiProcessEngine"
      factory-method="getHistoryService" />
   <bean id="activitiManagementService" factory-bean="activitiProcessEngine"
      factory-method="getManagementService" />



——————————————————————————–

Many thanks for helping
Heiko
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

What do you mean with after a while? Do you run this application in a web container?
Please provide some more details or event better a test project so we can reproduce the error.

Best regards,

waldi666
Champ in-the-making
Champ in-the-making
Hi,

I have a web application (war) with all libraries & spring configurations inside. This war will be deployed to a jetty
server. Clients access the application over webservice (jax-ws) layer. Each client request have to call an deployed
activiti workflow.
This works if i have started the jetty server. If the server in idle time (maybe 5-10 minutes) the next client call
runs in the exception.

I looks like the inmemory h2 database is lost at this time.

At the moment i will try to change the h2 database setting from:
<property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
to
<property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=-1" />

thanks
Heiko

ftr
Champ in-the-making
Champ in-the-making
I actually encouter the same problem with deployment in a Web Module on JBoss 6. It all starts out fine but after a while I get the exact same error with the same datasource configuration.

trademak
Star Contributor
Star Contributor
Is there a specific reason why you are using an in-memory data source?
I would go for a standalone H2 database, just like the Activiti Explorer does.

Best regards,

ftr
Champ in-the-making
Champ in-the-making
We're currently evaluating activiti and use the in-memory version for convenience, it's unlikely that we're gonna stick with the in-memory approach should we decide to go forward with activiti.