Activiti

Make demo.setup run on MySQL

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 5.0.alpha4
  • Fix Version/s: 5.0.beta2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Currently the demo setup fails after changing the build.properties file to mysql with the exception that the driver class is not found.

Activity

Hide
Tom Baeyens added a comment -

As part of this, we also need to think about how we'll deal with non-redistributable drivers. Would users have to install them into their own local repo manually? If so, we should document that procedure and show an appropriate error message if the user did not do that properly.

Maybe it's also an option to create a private repo of the non redistributable drivers. Maybe there are other and better solutions. Listing the options and deciding on the strategy is the first thing to do for this issue.

Show
Tom Baeyens added a comment - As part of this, we also need to think about how we'll deal with non-redistributable drivers. Would users have to install them into their own local repo manually? If so, we should document that procedure and show an appropriate error message if the user did not do that properly. Maybe it's also an option to create a private repo of the non redistributable drivers. Maybe there are other and better solutions. Listing the options and deciding on the strategy is the first thing to do for this issue.
Hide
Frederik Heremans added a comment -

When using MySQL as DB, the following steps need to be performed, which aren't perfomed right now:

  • Add mysql-connector-*.jar to /lib when deploying engine in tomcat
  • When deploying running deploy.bar, mysql-connector should be on classpath of the launched ProcessEngine
  • Add file mysql.data.sql (copy of h2.data.sql) with insert-statements for the demo-data

I guess documenting a procedure to download the connector and add to the libs of activiti-distro will be sufficient (or guidelines to install it in local repo depending on the strategy used to build demo-classpath). Since there is the possibility to get the demo running on h2, even for beginning developers with little experience with java/ant. Once a developer want's to use a custom database, I think we can presume downloading/maven'ing of the mysql-connector isn't a big hurdle to take.

Show
Frederik Heremans added a comment - When using MySQL as DB, the following steps need to be performed, which aren't perfomed right now:
  • Add mysql-connector-*.jar to /lib when deploying engine in tomcat
  • When deploying running deploy.bar, mysql-connector should be on classpath of the launched ProcessEngine
  • Add file mysql.data.sql (copy of h2.data.sql) with insert-statements for the demo-data
I guess documenting a procedure to download the connector and add to the libs of activiti-distro will be sufficient (or guidelines to install it in local repo depending on the strategy used to build demo-classpath). Since there is the possibility to get the demo running on h2, even for beginning developers with little experience with java/ant. Once a developer want's to use a custom database, I think we can presume downloading/maven'ing of the mysql-connector isn't a big hurdle to take.
Hide
Joram Barrez added a comment -

Afaik, that are indeed the steps to run the demo setup on MySQL.

Imo, we should be able to get the installation of the demo.setup on open-source databases fairly easy automated.
The driver can be pulled from a maven repo or included in the libs.

I believe that Tom is referring to for example the Oracle driver, which can't be distributed by third parties (= us). That would require documentation and guidelines.

Show
Joram Barrez added a comment - Afaik, that are indeed the steps to run the demo setup on MySQL. Imo, we should be able to get the installation of the demo.setup on open-source databases fairly easy automated. The driver can be pulled from a maven repo or included in the libs. I believe that Tom is referring to for example the Oracle driver, which can't be distributed by third parties (= us). That would require documentation and guidelines.
Hide
Andreas Kuckartz added a comment -

This is a problem/task shared by other Open Source projects. Maybe a common solution exists or is possible?

See also:
http://www.springfuse.com/install-oracle-jdbc-driver-in-maven-repository

Show
Andreas Kuckartz added a comment - This is a problem/task shared by other Open Source projects. Maybe a common solution exists or is possible? See also: http://www.springfuse.com/install-oracle-jdbc-driver-in-maven-repository
Hide
Frederik Heremans added a comment -

Changes done in order to make this work:

  • Altered build-script to use 'database' profile when copying dependencies for activiti-engine. This way all supported database libs will be fetched from maven when demo is setup. We deploy only the needed jars for the selected db to tomcat when deploying engine.
  • Added mysql-scripts for activiti cycle
  • Using 'ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin' when creating tables, to allow for 'LIKE' queries to be case-sensitive (also related to ACT-136)
Show
Frederik Heremans added a comment - Changes done in order to make this work:
  • Altered build-script to use 'database' profile when copying dependencies for activiti-engine. This way all supported database libs will be fetched from maven when demo is setup. We deploy only the needed jars for the selected db to tomcat when deploying engine.
  • Added mysql-scripts for activiti cycle
  • Using 'ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin' when creating tables, to allow for 'LIKE' queries to be case-sensitive (also related to ACT-136)

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: