camunda

HistoryLevel mismatch on Camunda 7.2


I deployed camunda.war (7.2) into my vanilla tomcat7 following the guide on official web-site.

Now when i starting tomcat i have the following error:

GRAVE: Error while closing command context
org.camunda.bpm.engine.ProcessEngineException: historyLevel mismatch: configuration says org.camunda.bpm.engine.impl.history.HistoryLevelAudit@21 and database says 3

In the database (ACT_GE_PROPERTY table) the historyLevel is set to 3 this is my bpm-platform.xml file

    <?xml version="1.0" encoding="UTF-8"?>
<bpm-platform xmlns="http://www.camunda.org/schema/1.0/BpmPlatform"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.camunda.org/schema/1.0/BpmPlatform http://www.camunda.org/schema/1.0/BpmPlatform ">

  <job-executor>
    <job-acquisition name="default" />
  </job-executor>

  <process-engine name="default">
    <job-acquisition>default</job-acquisition>
    <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
    <datasource>java:jdbc/solve</datasource> 

    <properties>
      <property name="history">full</property>
      <property name="databaseSchemaUpdate">true</property>
      <property name="authorizationEnabled">true</property>
      <property name="jobExecutorDeploymentAware">true</property>
    </properties>


    <plugins>

    <!-- plugin enabling Process Application event listener support -->
        <plugin>
           <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
        </plugin>

    <!-- plugin enabling integration of camunda Spin -->
        <plugin>
           <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
        </plugin>

        <!-- plugin enabling connect support -->
        <plugin>
           <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
        </plugin>
    </plugins>

  </process-engine>

</bpm-platform>

EDIT

Processes.xml

    <?xml version="1.0" encoding="UTF-8" ?> 
<process-application 
     xmlns="http://www.camunda.org/schema/1.0/ProcessApplication" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

  <process-archive name="MyProcess"> 
    <process-engine>myEngine</process-engine>
    <properties> 
      <property name="isDeleteUponUndeploy">false</property> 
      <property name="isScanForProcessDefinitions">true</property> 
    </properties> 
  </process-archive> 

</process-application>

applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jee="http://www.springframework.org/schema/jee"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
       http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd">


    <jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/my_process" />

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

    <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
        <property name="processEngineName" value="myEngine" /> 
        <property name="dataSource" ref="dataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="databaseSchemaUpdate" value="true" />
        <property name="jobExecutorActivate" value="false" />
        <property name="deploymentResources" value="classpath*:*.bpmn" />
        <property name="processEnginePlugins">
            <list>
              <bean id="spinPlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
            </list>
        </property>
    </bean>

    <bean id="processEngine" class="org.camunda.bpm.engine.spring.container.ManagedProcessEngineFactoryBean" destroy-method="destroy">
        <property name="processEngineConfiguration" ref="processEngineConfiguration" />
    </bean>

    <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
    <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
    <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
    <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
    <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />

    <bean id="MyProcess" class="org.camunda.bpm.engine.spring.application.SpringServletProcessApplication" />

    <context:annotation-config />

    <bean class="it.processes.Starter" />
    <bean id="cudOnProcessVariableService" class="it.services.CUDonProcessVariableService" />

</beans>

Solution

  • Did you download the 'camunda standalone webapp' WAR for Tomcat from camunda.org/download?

    If so, you should adjust the history level inside the 'application-context.xml' file by adding <property name="history" value="full"/> to the process engine configuration bean <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration>.

    Otherwise it is strange that you write you install camunda.war to a vanilla Tomcat but post a reference to your bpm-platform.xml file which is not used at all when you are not using the shared process engine approach.