I have installed successfully Drools KIE-WB with MYSQL (in Tomcat), and I want to achieve the same goal with the dashbuilder.
My dashbuilder package is jbpm-dashbuilder-6.1.0-SNAPSHOT-tomcat-7
. And I have tested two different options:
The first tested option is:
Executing the file in tomcat-7.0.50\webapps\dashbuilder\WEB-INF\etc\sql\1-create-mysql.sql
. It creates some tables, but seems that something is missed, because this error appears when starting the server:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dashboarddb.processinstancelog' doesn't exist
The second tested option is:
Change tomcat-7.0.50\webapps\dashbuilder\META-INF\context.xml
to have the next datasource
<Resource name="jdbc/jbpm" auth="Container"
type="javax.sql.DataSource" username="drools-user" password="pass" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/dashboarddb?useUnicode=true&characterEncoding=UTF8"
maxActive="8"
/>
And in tomcat-7.0.50\webapps\dashbuilder\WEB-INF\etc\hibernate.cfg.xml
I have added the next line:
<property name="hibernate.hbm2ddl.auto">update</property>
To force Hibernate to create all tables in MySQL. This almost work (create several tables) but an error appears:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1-title-Dashboards Showcase' for key 'PRIMARY'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
...
And I have no idea how to fix it (because I have no information about what Hibernate is doing and creating).
I have no more ideas of how to install the dashboard using MySQL. Any clue about how to achieve it?