Getting started with OpenVPMS

Overview

The purpose of this document is to outline the requirements for getting the OpenVPMS webapp up and running from the source.

Tools

Setting up MySQL

MySQL Server

When configuring the MySQL server:

  • the InnoDB storage engine should be used.
  • UTF8 should be the default character set.

These have the corresponding settings my.ini:

default-character-set=utf8
default-storage-engine=INNODB

Creating the database

Create a database named openvpms_dev, with a single user openvpms:

mysql -u root -p
mysql> create database openvpms_dev;
mysql> grant all on openvpms_dev.* to openvpms identified by 'openvpms';

Getting the source

To get the most recent sources from git:

 git clone https://bitbucket.org/OpenVPMS/openvpms.git openvpms

Building the source

The easiest way to build the source is to simply run:

> cd openvpms
> mvn -DskipTests install

Running the webapp

To run the webapp from maven from the command line:

1. Create the database schema, load archetypes, and sample data

> cd openvpms-archetypes
> mvn openvpms-db:create openvpms-archetype:load openvpms-data:load

2. Load SMS archetypes

> cd ../openvpms-sms
> mvn openvpms-archetype:load

3. Load report templates

> cd ../openvpms-release
> mvn openvpms-report:load

4. Start Jetty

> cd ../openvpms-web/openvpms-web-app/
> mvn jetty:run

The app can be accessed at http://localhost:8080/openvpms/app

Login user name is admin password is admin

OpenOffice

OpenVPMS will start without OpenOffice being present. However, it is required when:

  • printing, merging and converting .odt and .doc documents
  • running tests

The soffice binary must be in the PATH in order for OpenVPMS to locate it.

Debugging

SQL Logging

To log SQL queries, p6spy can be enabled as follows:

> mvn -Djdbc.driverClassName=com.p6spy.engine.spy.P6SpyDriver -Djdbc.url=jdbc:p6spy:mysql://localhost:3306/openvpms_dev jetty:run

This will log all SQL to a file named spy.log, in the current directory.

Syndicate content