View Source

h1. *MySQL database*

If you don't have one yet, download and install MySQL server.

Create a database and a user with all rights granted to this database:


{code}
$mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.60-enterprise-gpl-log MySQL Enterprise Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql:root:(none)> CREATE DATABASE IF NOT EXISTS petals;
Query OK, 1 row affected (0.02 sec)

mysql:root:(none)> GRANT ALL PRIVILEGES ON petals.* TO 'petals'@'%' IDENTIFIED BY 'petals';
Query OK, 0 row affected (0.04 sec)

mysql:root:(none)> quit
Bye
$
{code}

h1. *petals-view.properties file*

Open this file (located in PetalsView-docs directory) and adapt informations to fit your database configuration (database name, users id and password, MySQL server address). Save the file.

!PetalsView-Properties.png|thumbnail,border=1,align=center!


{note}MySQL jdbc-driver isn't into the classpath directory. You need to copy mysql-connector-java-5.1.x.jar into PetalsView/ WEB-INF/lib{note}

h1. *SE-KPI Component configuration*


Open the jbi.xml file into the META_INF directory (open the petals-se-kpi-*.zip archive to find it).

Replace the line:

{code}
<petals-se-kpi:hibernateURL xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5" xmlns:petals-se-kpi="http://petals.ow2.org/components/petals-se-kpi/version-1.0-SNAPSHOT" xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:kpi-config="http://petals.ow2.org/components/petals-se-kpi/specific"/>
{code}
By another with the used properties:

{code}
<petals-se-kpi:hibernateURL xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5" xmlns:petals-se-kpi="http://petals.ow2.org/components/petals-se-kpi/version-1.0-SNAPSHOT" xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:kpi-config="http://petals.ow2.org/components/petals-se-kpi/specific">file:/home/user/Desktop/petals-view.properties</petals-se-kpi:hibernateURL>
{code}



{note}
MySQL jdbc-driver isn't into the classpath directory. You need to copy mysql-connector-java-5.1.x.jar into the se-kpi-*.zip archive (at the root path, with the others jars). You also need to add this new jar to the element list of the jbi.xml:

{code}
<path-element>mysql-connector-java-5.1.x.jar</path-element>
{code}{note}




h1. *Petals View configuration*

Go to PetalsView-webapp/PetalsView.war/WEB-INF/spring

Open petals-view-annotation.xml

On the line <property >, in value quotation marks, fill in "petals-view.properties" file location.

Example : [file:///home/user/Bureau/petals-view.properties]








!petalsview-annotation.png|thumbnail,border=1,align=center!