Hi All,i'm encountering a problem during mysql database connection.below the sequence steps i followed:1) creation of "Activiti" database and user into mysql server2) deploying of mysql connector to tomcat Lib folder (mysql-connector-java-5.1.21.jar)3) modification of db.properties file in order to connect to Activiti database
db=activiti
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/activiti?autoReconnect=true
jdbc.username=activiti
jdbc.password=*
4) reboot of tomcat5) creation of an "activiti.cfg.xml" file placed on src/main/resources path of my eclipse project
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" >
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/activiti" />
<property name="username" value="activiti" />
<property name="password" value="*" />
<property name="defaultAutoCommit" value="false" />
</bean>
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
</bean>
</beans>
6) Maven refresh of the project (mvn eclipse:eclipse)My App contains only the following test code:
public static void main(String[] args) {
ProcessEngineConfiguration pec = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault();
System.out.println(pec.getDataSourceJndiName());
System.out.println(pec.getJdbcDriver());
System.out.println(pec.getJdbcUrl());
System.out.println(pec.getJdbcUsername());
System.out.println(pec.getJdbcPassword());
}
but the result is the following:
null
org.h2.Driver
jdbc:h2:tcp://localhost/activiti
sa
Point of attention: the schema was created on db 'activiti' when i restarted.My activiti version is 5.14My tomcat version is 7.0.42My mysql version is 5.6.11Please tell me if you need more information or if you already discussed about the solution in other threads (i have searched in forum from top to bottom but unsuccessfully).Thank you in advance!Andrea