Professional Documents
Culture Documents
Version 5.4.2
Contents
Overview ..................................................................................................................................... 3
Part 1. Requirements for installing BOS ........................................................................................ 3
Part 2. Install BOS-Tomcat bundle and configure if needed for external database .......................... 4
2.1 Install the BOS-Tomcat bundle ............................................................................................... 4
2.2 Configure the BOS-Tomcat bundle for use with MySQL ......................................................... 6
Part 3. Install BOS-JBoss bundle and configure if needed for external database .......................... 12
3.1 Install the BOS-JBoss bundle ................................................................................................. 12
3.2 Configure BOS-JBoss bundle for use with MySQL................................................................. 13
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 2
“How to” install BOS bundles
Overview
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.
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.
You will need Java Runtime Environment 5 (or Java SE Development Kit 5) or above to install
BOS. (http://www.java.com/en/download/manual.jsp or
http://www.oracle.com/technetwork/java/javase/downloads/index.html)
Be sure that JRE or JDK is installed correctly and JAVA_HOME and JRE_HOME variables are
defined (with different values).
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 3
“How to” install BOS bundles
Part 2. Install BOS-Tomcat bundle and configure if needed for external database
This location path will be referenced as <TOMCAT_HOME> in the following sections of this
document.
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.
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:
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 4
“How to” install BOS bundles
Username: admin, john, jack, or james
Password: bpm
Note: If you are unable to reach the log-in page shown above, consult the log files in
<TOMCAT_HOME>\logs.
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 5
“How to” install BOS bundles
2.2 Configure the BOS-Tomcat bundle for use with MySQL
bonita_journal
bonita_history
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.
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 6
“How to” install BOS bundles
by adding a hash (#) at the beginning of the original line to de-activate H2:
original line:
hibernate.dialect [] org.hibernate.dialect.H2Dialect
original line:
hibernate.connection.shutdown [] true
original line:
bonita.hibernate.interceptor []
org.ow2.bonita.env.interceptor.H2DescNullFirstInterceptor
by deleting the hash (#) at the beginning of the original line, to activate MySQL.
original line:
#hibernate.dialect []
org.hibernate.dialect.MySQL5InnoDBDialect
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 7
“How to” install BOS bundles
original line:
#hibernate.connection.shutdown [] true
original line:
#bonita.hibernate.interceptor []
org.ow2.bonita.env.interceptor.MySQLDescNullFirstInterceptor
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 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 bundles www.bonitasoft.com | © BonitaSoft S.A. page 8
“How to” install BOS bundles
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"
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 bundles www.bonitasoft.com | © BonitaSoft S.A. page 9
“How to” install BOS bundles
Extract the mysql-connector-java-5.1.15-bin.jar file from the downloaded .zip file and install
into: <TOMCAT_HOME>\lib\bonita
Start Tomcat
Connect to BOS
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:
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 10
“How to” install BOS bundles
Note: If you are unable to reach the log-in page shown above, please consult the log files.
(see 2.2.7, Log errors).
With your database server and web container running, point your web browser to
http://<SERVERADDRESS:port>/bonita/.
Note: If you are unable to reach the log-in page shown above, consult the log files in
<TOMCAT_HOME>\logs.
2.2.8 Troubleshooting
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 11
“How to” install BOS bundles
Part 3. Install BOS-JBoss bundle and configure if needed for external database
This location path will be referenced as <JBOSS_HOME> in the following sections of this
document.
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.
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:
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 12
“How to” install BOS bundles
Password: bpm
Note: If you are unable to reach the log-in page shown above, consult the log files in
<JBOSS_HOME>\logs.
bonita_journal
bonita_history
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.
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 13
“How to” install BOS bundles
These modifications are shown below:
by adding a hash (#) at the beginning of the original line to de-activate H2:
original line:
hibernate.connection.shutdown [] true
original line:
bonita.hibernate.interceptor
org.ow2.bonita.env.interceptor.H2DescNullFirstInterceptor
by deleting the hash (#) at the beginning of the original line, to activate MySQL.
original line:
#hibernate.dialect []
org.hibernate.dialect.MySQL5InnoDBDialect
original line:
#hibernate.connection.shutdown [] true
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 14
“How to” install BOS bundles
original line:
#bonita.hibernate.interceptor
org.ow2.bonita.env.interceptor.MySQLDescNullFirstInterceptor
Move and modify the BOS-JBoss data source configuration file called mysql-ds.xml, to
change the database configuration from H2 to MySQL.
<JBOSS_HOME>\server\default\deploy
original lines:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://mysql-
hostname:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>x</user-name>
<password>y</password>
<exception-sorter-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSort
er</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with
"ping" support
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 15
“How to” install BOS bundles
<valid-connection-checker-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnecti
onChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-
sql>
-->
<!-- sql to call on an existing pooled connection when it
is obtained from pool - MySQLValidConnectionChecker is
preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-
valid-connection-sql>
-->
Result after changes in green. Note that you need to copy part of the file and modify it so
you have configuration for both bonita/default/journal and bonita/default/history (shown in
solid green at the end of the file below).
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<no-tx-datasource>
<jndi-name>bonita/default/journal</jndi-name>
<connection-
url>jdbc:mysql://<serverIPaddress>:3306/bonita_journal</connection-
url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>bonita</user-name>
<password>bpm</password>
<exception-sorter-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exc
eption-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping"
support
<valid-connection-checker-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionCheck
er</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is
obtained from pool - MySQLValidConnectionChecker is preferred for
newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-
connection-sql>
-->
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 16
“How to” install BOS bundles
<type-mapping>mySQL</type-mapping>
</metadata>
</no-tx-datasource>
<no-tx-datasource>
<jndi-name>bonita/default/history</jndi-name>
<connection-
url>jdbc:mysql://<serverIPaddress>:3306/bonita_history</connection-
url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>bonita</user-name>
<password>bpm</password>
<exception-sorter-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exc
eption-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping"
support
<valid-connection-checker-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionCheck
er</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is
obtained from pool - MySQLValidConnectionChecker is preferred for
newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-
connection-sql>
-->
</datasources>
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.
Extract the mysql-connector-java-5.1.15-bin.jar file from the downloaded .zip file and install
into: <JBOSS_HOME>\lib\bonita
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 17
“How to” install BOS bundles
3.2.6 Validate the database re-configuration installation
Start JBoss
Connect to BOS
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:
Note: If you are unable to reach the log-in page shown above, consult the log files in
<JBOSS_HOME>\logs.
With your database server and web container running, point your web browser to
http://<SERVERADDRESS:port>/bonita/.
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 18
“How to” install BOS bundles
3.2.8 Troubleshooting
BOS 5.4 – HowTo Install BOS bundles www.bonitasoft.com | © BonitaSoft S.A. page 19