0

I have added below profile in \standalone\configuration\Standalone-full.xml but still not done with mysql db.

I added jbpmDS as mysql data source but still jbpm not going to use this one, both datasources are valid and connect as I confirmed from admin console.

If I remove ExampleDS data source then its getting failed totally as ExampleDS is required and mandatory as I get reference from other community forum. Please suggest if anybody have configured same earlier.

<datasources>
         <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                <driver>h2</driver>
                <security>
                    <user-name>sa</user-name>
                    <password>sa</password>
                </security>
            </datasource>

            <datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="jbpmDS" enabled="true" use-java-context="true">
                <connection-url>jdbc:mysql://localhost:3306/jbpm</connection-url>
                <driver>mysql</driver>
                <security>
                    <user-name>root</user-name>
                    <password>root</password>
                </security>
            </datasource>
            <drivers> <driver name="h2" module="com.h2database.h2">
                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                </driver>
                <driver name="mysql" module="com.mysqldatabase.mysql">
                    <driver-class>com.mysql.jdbc.Driver</driver-class>
                    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                </driver>
            </drivers>
    </datasources>
Nitin
  • 1
  • 3

2 Answers2

0

Add below system properties in standalone-full.xml file,

<system-properties>
 <property name="org.kie.server.persistence.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
 <property name="org.kie.server.persistence.ds" value="java:jboss/datasources/jbpmDS"/> 
</system-properties>
Abhijit Humbe
  • 1,563
  • 1
  • 12
  • 13
0

I was facing the same issue.

Fixed it by adding system-properties in standalone.xml-

<system-properties>
<property name="org.kie.server.persistence.dialect" 
value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="org.kie.server.persistence.ds" 
value="java:jboss/datasources/jbpmDS"/> 
</system-properties>

Make Sure you have added mysql connector jar and module.xml in below path \modules\system\layers\base\com\mysqldatabase\mysql\main

module.xml

<module xmlns="urn:jboss:module:1.5" name="com.mysqldatabase.mysql">

<resources>
    <resource-root path="mysql-connector-java-5.1.38.jar"/>
</resources>
<dependencies>
    <module name="javax.api"/>
    <module name="javax.transaction.api"/>
    <module name="javax.servlet.api" optional="true"/>
</dependencies>

Hasan
  • 1
  • 2