Are you trying to use a database other than H2, such as MySQL?
If you’re using MySQL, you’ll find scripts under the distribution’s root directory in subdirectory “sql/create”. You would need to create a database first, we call ours “camunda_db” in the MySQL server. Then execute the “mysql_engine_7.6.2-ee.sql” script, followed by the “mysql_identity_7.6.2-ee.sql” script.
You would then need to create a user for Camunda to log into that database and grant that user DELETE, INSERT, SELECT, and UPDATE privileges.
In your Java container (Tomcat, WildFly, etc.) database configuration, you would need to insert a datasource configuration string to allow the Process Engine to connect to the database. Following is an example from the WildFly standalone.xml file which assumes the MySQL server is running on the same server as Camunda:
<datasources>
<datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true" statistics-enabled="true">
<connection-url>jdbc:mysql://127.0.0.1:3306/camunda_db?useSSL=false&autoReconnect=true</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql</driver>
<pool>
<min-pool-size>5</min-pool-size>
<initial-pool-size>5</initial-pool-size>
<max-pool-size>50</max-pool-size>
</pool>
<security>
<user-name>camunda</user-name>
<password>camundapass</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
<background-validation>true</background-validation>
<background-validation-millis>2000</background-validation-millis>
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.StaleConnectionChecker"/>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
</validation>
<timeout>
<set-tx-query-timeout>false</set-tx-query-timeout>
<blocking-timeout-millis>0</blocking-timeout-millis>
<idle-timeout-minutes>0</idle-timeout-minutes>
<query-timeout>0</query-timeout>
<use-try-lock>0</use-try-lock>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
This configuration example (which is for WildFly) would also require you to put the MySQL Connector/J driver library in the WildFly modules section (or Tomcat’s equivalent). The driver jar file goes here:
/usr/local/camunda-bpm-ee-wildfly10-7.6.2-ee/server/wildfly-10.1.0.Final/modules/system/layers/base/com/mysql/main/mysql-connector-java-commercial-5.1.39-bin.jar
You will also need to create a module.xml file at:
/usr/local/camunda-bpm-ee-wildfly10-7.6.2-ee/server/wildfly-10.1.0.Final/modules/system/layers/base/com/mysql/main/module.xml
This should contain the following:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-commercial-5.1.39-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
The configuration would also require you to place the “ironjacamar” validation libraries in the modules directories as shown in this directory tree:
/usr/local/camunda-bpm-ee-wildfly10-7.6.2-ee/server/wildfly-10.1.0.Final/modules/system/layers/base/org/jboss/ironjacamar
├── api
│ └── main
│ ├── ironjacamar-common-api-1.3.4.Final.jar
│ ├── ironjacamar-common-spi-1.3.4.Final.jar
│ ├── ironjacamar-core-api-1.3.4.Final.jar
│ └── module.xml
├── impl
│ └── main
│ ├── ironjacamar-common-impl-1.3.4.Final.jar
│ ├── ironjacamar-core-impl-1.3.4.Final.jar
│ ├── ironjacamar-deployers-common-1.3.4.Final.jar
│ ├── ironjacamar-validator-1.3.4.Final.jar
│ └── module.xml
└── jdbcadapters
└── main
├── ironjacamar-jdbc-1.3.4.Final.jar
└── module.xml
The module file at “…/jboss/ironjacamar/api/main/module.xml” would contain the following:
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<module xmlns="urn:jboss:module:1.3" name="org.jboss.ironjacamar.api">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="ironjacamar-common-api-1.3.4.Final.jar"/>
<resource-root path="ironjacamar-common-spi-1.3.4.Final.jar"/>
<resource-root path="ironjacamar-core-api-1.3.4.Final.jar"/>
</resources>
<dependencies>
<module name="javax.resource.api"/>
<module name="javax.api"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.threads"/>
</dependencies>
</module>
The “module.xml” file under “…/jboss/ironjacamar/impl/main” would contain the following:
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<module xmlns="urn:jboss:module:1.3" name="org.jboss.ironjacamar.impl">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="ironjacamar-common-impl-1.3.4.Final.jar"/>
<resource-root path="ironjacamar-core-impl-1.3.4.Final.jar"/>
<resource-root path="ironjacamar-deployers-common-1.3.4.Final.jar"/>
<resource-root path="ironjacamar-validator-1.3.4.Final.jar"/>
</resources>
<dependencies>
<module name="sun.jdk"/>
<!-- javax.security.auth.callback -->
<module name="javax.api"/>
<module name="javax.resource.api"/>
<module name="javax.security.auth.message.api"/>
<module name="javax.validation.api"/>
<module name="org.hibernate.validator"/>
<module name="org.jboss.as.naming"/>
<module name="org.jboss.as.transactions"/>
<module name="org.jboss.jboss-transaction-spi"/>
<module name="org.jboss.ironjacamar.api"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.threads"/>
<!-- org.jboss.security -->
<module name="org.picketbox"/>
<module name="javax.xml.stream.api"/>
<!--jgroups -->
<module name="org.jgroups"/>
</dependencies>
</module>
The module file at “jboss/ironjacamar/jdbcadapters/main/module.xml” would contain the following:
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<module xmlns="urn:jboss:module:1.3" name="org.jboss.ironjacamar.jdbcadapters">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="ironjacamar-jdbc-1.3.4.Final.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.resource.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="org.hibernate.validator"/>
<module name="org.jboss.as.naming"/>
<module name="org.jboss.as.transactions"/>
<module name="org.jboss.jboss-transaction-spi"/>
<module name="org.jboss.ironjacamar.api"/>
<module name="org.jboss.ironjacamar.impl"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.threads"/>
<module name="javax.xml.stream.api"/>
</dependencies>
</module>
After all of that is set up and you restart the Java container, Camunda should connect to the database and all of your Camunda data will be persistent.