Set up mysql-connector-5.1.6 to make deployed camunda application accessible for a mysql database


I have a problem concerning the use of an mysql db in my deployed camunda applciation. In my JDK i just integrated the mysql-connector-5.1.6 JDBC Driver in order to store application related information into a mysql db. It works fine. Unfortunately the Driver is not recognized after deploying my application to the Tomcat Server. I tried to insert the corresponding dependency into the META-INF/pom.xml. But then the file is marked as faulty.

Can anyone help me please :confused:?

Many Thanks in advance and Kind Regards :slight_smile:

A couple of suggestions here and I will admit that I am not a Tomcat expert, so the following may be nonsense to those who are. You should consider setting up a Tomcat datasource for your database. That way you can access it using fairly common methods (which I canโ€™t necessarily describe), but that is how Camunda talks to itโ€™s database when running in WildFly. The datasource also provides a persistent connection for use by other applications.

That said, the most common issue in these cases is that the driver jar file is simply not in the right place on the Tomcat server. If Tomcat supports the notion of globally available classes like WildFly does (called modules), then you most likely will need to copy the driver to a specific location in Tomcat and possible provide a separate descriptor file (module.xml in WildFly) for the Java server to recognize and use the jar file. In WildFly, once you do this, that driver becomes universally available to any application running in the WildFly container.

I would assume Tomcat has similar functionality.

Hi @rlafraie,

You have to put the mysql-connector.jar file into the %TOMCAT_HOME%/lib folder and restart it. It is then available to all applications running on that Tomcat.
Additionally you have to configure the datasource of the process engine to use the correct driver etc. That has to be done inside %TOMCAT_HOME%/conf/server.xml.