BOS 5.4.1 Bundle Installation Guide

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Bonita Open Solution

Version 5.4.1

BOS Bundle Installation Guide


“How to” install BOS-Tomcat or BOS-JBoss bundle
(option: with external database)
“How to” install a BOS bundle with or without an external database

Contents

Overview ..................................................................................................................................... 3
Part 1. Requirements for installing BOS ........................................................................................ 3
Part 2. Install BOS-Tomcat bundle and configure if needed for external database .......................... 3
2.1 Install the BOS-Tomcat bundle ............................................................................................... 3
2.2 Configure the BOS-Tomcat bundle for use with MySQL ......................................................... 5
Part 3. Install BOS-JBoss bundle and configure if needed for external database .......................... 11
3.1 Install the BOS-JBoss bundle ................................................................................................. 11
3.2 Configure the BOS-JBoss bundle for use with MySQL. ......................................................... 12

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 2
“How to” install a BOS bundle with or without an external database

Bonita Open Solution


“How to” install a BOS bundle
with or without an external database

Overview

In this document, Bonita Open Solution will be referred to as BOS.

This “How to” guide contains instructions for installing a BOS-bundle and covers the
configuration of your bundled application server for MySQL. (You can however, adapt this
process to any database with an existing Hibernate dialect
(http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/session-
configuration.html#configuration-optional-dialects).

The simplest, fastest installation of BOS for a server environment, can be made using the
BOS-bundle, with the default H2 database provided.

Note: We do not recommend the use of a simple bundle installation using the default H2
database for production. This document describes how to change the connection from the
default H2 database to an external database (MySQL), which is a production-friendly option.

This document has 3 parts:

Part 1 General requirements for BOS installation

Part 2 Install BOS-Tomcat bundle and configure. The simple bundle installation with the
default H2 database is fully described in Part 2.1. Follow Part 2.2 to configure the bundle to
use a different, external database.

Part 3 Install BOS-JBoss bundle and configure. The simple bundle installation with the
default H2 database is fully described in Part 3.1. Follow Part 3.2 to configure the bundle to
use a different, external database.

Part 1. Requirements for installing BOS

You will need JDK 5 or above to install BOS.

Part 2. Install BOS-Tomcat bundle and configure if needed for external database

2.1 Install the BOS-Tomcat bundle

Download the BOS-Tomcat bundle from the BonitaSoft website


(http://www.bonitasoft.com/products/BPM_download.php).

Unzip the BOS-Tomcat bundle in the folder of your choice.

This location path will be referenced as <tomcat_home> in the following sections of this
document.

Choose a location close to the root directory, for example


c:\BOS on windows
/opt/BOS on linux

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 3
“How to” install a BOS bundle with or without an external database

Note: Avoid spaces and special characters in the folder path.

2.1.1 Launch and verify BOS-Tomcat bundle installation with H2 database

Note: If you will be using only the default H2 database, validate your installation now.
If you will be using an external database, such as MySQL, skip this step and continue to 2.2,
Configure the BOS-Tomcat bundle for use with MySQL.

 On Windows, go to <tomcat_home>\bin\ and click on startup.bat.


 On Linux, go to <tomcat_home>/bin/ and click on startup.sh script.

Point your web browser to http://<serveraddress>:8080/bonita.

Note: Be sure to replace <serveraddress> with a fully qualified domain name (FQDN) or the
IP address of the server. Avoid using localhost for <serveraddress> .

You should be able to access the Bonita User Experience login page:

You can log in with one of the following usernames and a single password:

 Username: admin, john, jack, or james


 Password: bpm

Note: If you are unable to reach the log-in page shown above, please consult the log files.
(see 2.2.7, Log errors).

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 4
“How to” install a BOS bundle with or without an external database

2.2 Configure the BOS-Tomcat bundle for use with MySQL

2.2.1 Set up 2 databases in MySQL to be used with the BOS-Tomcat bundle

Create 2 databases in MySQL:

 bonita_journal
 bonita_history

2.2.2 Configure the access privileges for MySQL

Create a dedicated user and password:


 User login: bonita
 password: bpm

Note: this can be changed later.

Grant this user all privileges to access the bonita_journal and bonita_history databases.

2.2.3 Modify the BOS configuration files for use with MySQL

In order to configure BOS for use with a database other than H2, you will need to edit 2
properties configuration files and 1 data source configuration file.

2.2.3.1 Edit the 2 Properties files

The 2 properties files are:


 bonita_journal.properties
 bonita_history.properties

To edit them, you will:


1. de-activate the H2 properties in:
o H2 bonita-journal.properties
o H2 bonita-history.properties

2. activate the MySQL properties in:


o MySQL bonita-journal.properties
o MySQL bonita-history.properties

These modifications are shown below.

1. de-activate H2 properties for bonita-journal.properties located at:


<tomcat_home>\bonita\server\default\conf\bonita-journal.properties

by adding a hash (#) at the beginning of the original line to de-activate H2:

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 5
“How to” install a BOS bundle with or without an external database

original line:
hibernate.dialect [] org.hibernate.dialect.H2Dialect

result after change in green:


#hibernate.dialect [] org.hibernate.dialect.H2Dialect

original line:
hibernate.connection.shutdown [] true

result after change in green:


#hibernate.connection.shutdown [] true

original line:
bonita.hibernate.interceptor []
org.ow2.bonita.env.interceptor.H2DescNullFirstInterceptor

result after change in green:


#bonita.hibernate.interceptor []
org.ow2.bonita.env.interceptor.H2DescNullFirstInterceptor

2. Do the same for the H2 bonita-history.properties file, located at:


<tomcat_home>\bonita\server\default\conf\bonita-history.properties

3. Activate MySQL properties for the bonita-journal.properties file, located at:


<mysql_home>\bonita\server\default\conf\bonita-journal.properties

by deleting the hash (#) at the beginning of the original line, to activate MySQL.

original line:
#hibernate.dialect []
org.hibernate.dialect.MySQL5InnoDBDialect

result after change in green:


hibernate.dialect []
org.hibernate.dialect.MySQL5InnoDBDialect

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 6
“How to” install a BOS bundle with or without an external database

original line:
#hibernate.connection.shutdown [] true

result after change in green:


hibernate.connection.shutdown [] true

original line:
#bonita.hibernate.interceptor []
org.ow2.bonita.env.interceptor.MySQLDescNullFirstInterceptor

result after change in green:


bonita.hibernate.interceptor []
org.ow2.bonita.env.interceptor.MySQLDescNullFirstInterceptor

4. Do the same for the H2 bonita-history.properties file located at:


<mysql_home>\bonita\server\default\conf\bonita-history.properties

2.2.3.2 Edit the data source file

Modify the BOS-Tomcat data source configuration file called ‘context.xml’, to change the
data base configuration from H2 (by default) to MySQL.

To do this, change the driverClass and jdbcUrl parameters for your configuration in the
Resources named bonita/default/journal and bonita/default/history.

Locate the data source configuration file called ‘context.xml’:


<tomcat_home>\conf\context.xml

1. Replace the configuration for the bonita/default/journal

Locate the Resource tag for bonita/default/journal and as shown below, replace the
default H2 driverClass and jdbcUrl parameters with MySQL parameters:

original H2 lines:
<Resource
name="bonita/default/journal"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="org.h2.Driver"
jdbcUrl="jdbc:h2:file:
${BONITA_HOME}/server/default/work/databases/bonita_jour
nal.db;FILE_LOCK=NO;MVCC=TRUE;DB_CLOSE_ON_EXIT=TRUE"

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 7
“How to” install a BOS bundle with or without an external database

result after change with new MySQL line in green:


<Resource
name="bonita/default/journal"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="com.mysql.jdbc.Driver"
jdbcUrl="jdbc:mysql://localhost:3306/bonita_journal?dont
TrackOpenResources=true"

2. Replace the configuration for bonita/default/history

Locate the Resource tag for bonita/default/history and as shown below, replace the
default H2 driverClass and jdbcUrl parameters with the MySQL parameters:

original H2 line:
<Resource
name="bonita/default/history"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="org.h2.Driver"
jbcUrl="jdbc:h2:file:${BONITA_HOME}/server/default/work/d
atabases/bonita_history.db;FILE_LOCK=NO;MVCC=TRUE;DB_CLOS
E_ON_EXIT=TRUE"

result after change with new MySQL line in green:


<Resource
name="bonita/default/history"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="com.mysql.jdbc.Driver"
jdbcUrl="jdbc:mysql://localhost:3306/bonita_history?dont
TrackOpenResources=true"

Note: Remember to set the user and password in your data source configuration in order to
match the “user and “password” you set (with full access rights) during 2.2.2 Configure the
access privileges for MySQL.

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 8
“How to” install a BOS bundle with or without an external database

2.2.4 Download and install the MySQL driver

Download the MySQL driver (http://dev.mysql.com/downloads/connector/j/).

Extract the mysql-connector-java-5.1.15-bin.jar file from the downloaded .zip file and install
into: <tomcat_home>\lib\bonita

Remove the jar file h2-1.2.139.jar to avoid conflicts.

2.2.5 Add the license file (for SP version)

Copy your SP license file to: <tomcat_home>\bonita\server\licenses.

2.2.6 Validate the database re-configuration

Start Tomcat

 On Windows, go to <tomcat_home>\bin\ and click on startup.bat.


 On Linux, go to <tomcat_home>/bin/ and click on startup.sh script.

If you have no error messages, you can connect to BOS.

Connect to BOS

Point your web browser to http://<serveraddress>:8080/bonita.

Note: Be sure to replace <serveraddress> with a fully qualified domain name (FQDN) or the
IP address of the server. Avoid using localhost for <serveraddress> .

You should be able to access the Bonita User Experience login page:

You can log in with one of the following usernames and a single password:

 Username: admin, john, jack, or james


 Password: bpm

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 9
“How to” install a BOS bundle with or without an external database
Note: If you are unable to reach the log-in page shown above, please consult the log files.
(see 2.2.7, Log errors).

2.2.7 Log errors

With your database server and web container running, point your web browser to
http://<serveraddress:port>/bonita/.

Check the web server logs for errors: <tomcat_home>\logs

Check your database log for errors also.

2.2.8 Troubleshooting

Here are some potential issues and possible explanations:

Behavior Possible explanation


Unable to create datasource instance context.xml contains error (property is missing)
check your datasource definition (eg Tomcat)
ClassNotFoundException: com.mysql.jdbc.Driver forgot to add jdbc drivers
Access denied: Connections could not be wrong username password specified in
acquired from the underlying database! context.xml

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 10
“How to” install a BOS bundle with or without an external database
Part 3. Install BOS-JBoss bundle and configure if needed for external database

3.1 Install the BOS-JBoss bundle

Download the BOS-JBoss bundle from the BonitaSoft website


(http://www.bonitasoft.com/products/BPM_download.php).

Unzip the BOS-JBoss bundle in the folder of your choice.

This location path will be referenced as <jboss_home> in the following sections of this
document.

Choose a location close to the root directory, for example


c:\ on windows
/opt/BOS on linux

Note: Avoid spaces and special characters in folder path.

3.1.1 Launch and verify your BOS-JBoss bundle installation with H2 database

Note: If you will be using only the default H2 database, validate your installation now.
If you will be using an external database, such as MySQL, skip this step and continue to 3.2,
Configure the BOS-JBoss bundle for use with MySQL.

 On Windows, go to <jboss_home>\bin\ and click on run.bat.


 On Linux, go to <jboss_home>\bin\ and click on run.sh script.

Point your web browser to http://<serveraddress>:8080/bonita.

Note: Be sure to replace <serveraddress> with a fully qualified domain name (FQDN) or the
IP address of the server. Avoid using localhost for <serveraddress> .

You should be able to access the Bonita User Experience login page:

You can log in with one of the following usernames and a single password:

 Username: admin, john, jack, or james


 Password: bpm

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 11
“How to” install a BOS bundle with or without an external database

Note: If you are unable to reach the log-in page shown above, please consult the log files.
(see 3.2.7, Log errors).

3.2 Configure the BOS-JBoss bundle for use with MySQL.

3.2.1 Set up 2 databases in MySQL to be used with the BOS-JBoss bundle

Create 2 databases in MySQL:

 bonita_journal
 bonita_history

3.2.2 Configure the access privileges for MySQL

Create a dedicated user and password:

 User login : bonita


 Password: bpm

Note: this can be changed later.

Grant this user all privileges to access the bonita_journal and bonita_history databases.

3.2.3 Modify the BOS configuration files for use with MySQL

In order to configure BOS for use with a database other than H2, you will need to
Edit 2 properties configuration files and 1 data source configuration file.

3.2.3.1 Edit the 2 Properties files

The 2 properties files are:


 bonita_journal.properties
 bonita_history.properties

To edit them, you will:


1. de-activate the H2 properties in:
o H2 bonita-journal.properties
o H2 bonita-history.properties

2. activate the MySQL properties in:


o MySQL bonita-journal.properties
o MySQL bonita-history.properties

These modifications are shown below:

1. de-activate H2 properties for bonita-journal.properties located at:


<jboss_home>\bonita\server\default\conf\bonita-journal.properties

by adding a hash (#) at the beginning of the original line to de-activate H2:

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 12
“How to” install a BOS bundle with or without an external database
original line in:
hibernate.dialect [] org.hibernate.dialect.H2Dialect

result after change in green:


#hibernate.dialect [] org.hibernate.dialect.H2Dialect

original line:
hibernate.connection.shutdown [] true

result after change in green:


#hibernate.connection.shutdown [] true

original line:
bonita.hibernate.interceptor
org.ow2.bonita.env.interceptor.H2DescNullFirstInterceptor

result after change in green:


#bonita.hibernate.interceptor
org.ow2.bonita.env.interceptor.H2DescNullFirstInterceptor

2. Do the same for the H2 bonita-history.properties file, located at:


<jboss_home>\bonita\server\default\conf\bonita-history.properties

3. Activate MySQL properties for the bonita-journal.properties file located at:


<mysql_home>\bonita\server\default\conf\bonita-journal.properties

by deleting the hash (#) at the beginning of the original line, to activate MySQL.

original line:
#hibernate.dialect []
org.hibernate.dialect.MySQL5InnoDBDialect

result after change in green:


hibernate.dialect []
org.hibernate.dialect.MySQL5InnoDBDialect

original line:
#hibernate.connection.shutdown [] true

result after change in green:


hibernate.connection.shutdown [] true

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 13
“How to” install a BOS bundle with or without an external database

original line:
#bonita.hibernate.interceptor
org.ow2.bonita.env.interceptor.MySQLDescNullFirstInterceptor

result after change in green:


bonita.hibernate.interceptor
org.ow2.bonita.env.interceptor.MySQLDescNullFirstInterceptor

3. Do the same for the bonita-history.properties file located at:


<mysql_home>\bonita\server\default\conf\bonita-history.properties

3.2.3.2 Edit the data source file

Modify the BOS-JBoss data source configuration file called ‘mysql-ds.xml’, in order to
change the data base configuration from H2 to MySQL.

To do this, change the driverClass and jdbcUrl parameters for your configuration in the
Resources named bonita/default/journal and bonita/default/history.

Locate the data source configuration file called ‘mysql-ds.xml’:


<jboss_home>\conf\ mysql-ds.xml

1. Replace the configuration for the bonita/default/journal

Locate the Resource tag for bonita/default/journal and as shown below, replace the
default H2 driverClass and jdbcUrl parameters with MySQL parameters:

original H2 lines:
<Resource
name="bonita/default/journal"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="org.h2.Driver"
jdbcUrl="jdbc:h2:file:
${BONITA_HOME}/server/default/work/databases/bonita_jour
nal.db;FILE_LOCK=NO;MVCC=TRUE;DB_CLOSE_ON_EXIT=TRUE"

result after change with new MySQL lines in green:


<Resource
name="bonita/default/journal"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="com.mysql.jdbc.Driver"
jdbcUrl="jdbc:mysql://localhost:3306/bonita_journal?dont
TrackOpenResources=true"

2. Replace the configuration for bonita/default/history

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 14
“How to” install a BOS bundle with or without an external database
Locate the Resource tag for bonita/default/history and as shown below, replace the
default H2 driverClass and jdbcUrl parameters with MySQL parameters:

original H2 lines:
<Resource
name="bonita/default/history"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="org.h2.Driver"
jbcUrl="jdbc:h2:file:${BONITA_HOME}/server/default/work/d
atabases/bonita_history.db;FILE_LOCK=NO;MVCC=TRUE;DB_CLOS
E_ON_EXIT=TRUE"

result after change with new MySQL lines in green:


<Resource
name="bonita/default/history"
auth="Container"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="org.apache.naming.factory.BeanFactory"
description="DB Connection"
driverClass="com.mysql.jdbc.Driver"
jdbcUrl="jdbc:mysql://localhost:3306/bonita_history?dont
TrackOpenResources=true"

Note: Remember to set the user and password in your data source configuration in order to
match the “user and “password” you set (with full access rights) during 3.2.2 Configure the
access privileges for MySQL.

3.2.4 Download and install the MySQL driver

Download the MySQL driver (http://dev.mysql.com/downloads/connector/j/)

Extract the mysql-connector-java-5.1.15-bin.jar file from the downloaded .zip file and install
into: <jboss_home>\lib\bonita

Remove the jar file h2-1.2.139.jar to avoid conflicts.

3.2.5 Add the license file (for SP version)

Copy your SP license file to: <jboss_home>\bonita\server\licenses.

3.2.6 Validate the database re-configuration installation

Start JBoss

 On Windows, go to <jboss_home>\bin\ and click on startup.bat.


 On Linux, go to <jboss_home>/bin/and click on startup.sh script.

If you have no error messages, you can connect to BOS.

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 15
“How to” install a BOS bundle with or without an external database
Connect to BOS

Point your web browser to http://<serveraddress>:8080/bonita.

Note: Be sure to replace <serveraddress> with a fully qualified domain name (FQDN) or the
IP address of the server. Avoid using localhost for <serveraddress> .

You should be able to access the Bonita User Experience login page:

You can log in with one of the following usernames and a single password:

 Username: admin, john, jack, or james


 Password: bpm

Note: If you are unable to reach the log-in page shown above, please consult the log files.
(see 3.2.7, log errors).

3.2.7 Log errors

With your database server and web container running, point your web browser to
http://<serveraddress:port>/bonita/.

Check the web server logs for errors: <jboss_home>\logs

Check your database log for errors also.

3.2.8 Troubleshooting

Here are some potential issues and possible explanations:

Behavior Possible explanation


Unable to create datasource instance mysql-ds.xml contains error (property is missing)
check your datasource definition (eg JBoss)
ClassNotFoundException: com.mysql.jdbc.Driver forgot to add jdbc drivers
Access denied: Connections could not be wrong username password specified in mysql-
acquired from the underlying database! ds.xml

BOS 5.4 – HowTo Install BOS with or without an external database www.bonitasoft.com | © BonitaSoft S.A. page 16

You might also like