View source | Discuss this page | Page history | Printable version   

ERP 2.50:Development Stack Setup



This article explains in detail how to install and configure the whole stack required for a Openbravo ERP development environment, including:

The whole guide is valid for all the hardware architectures the stack supports, such as x86 or x86_64. A minimum of 2GB or RAM is recommended for x86 and 3GB for x86_64.


A development setup has different needs than a production environment. The main goal is to make the developer's life as easy as possible, while increasing the productivity.

Some of the components are configured in the same way as in a production system. In those cases a link to the production environment setup is provided.

Operating System

We recommend using Linux or another UNIX-alike flavor (*BSD, OS-X, OpenSolaris). The amount of useful development tools provided by these operating systems are vastly superior to the rest, at least regarding Openbravo ERP. Do not use Windows.

Create an unprivileged user for you in this operating system. And once the environment is configured, avoid using the root user for anything related to Openbravo ERP development. Specially, do not compile as root.


Follow the installation steps to install PostgreSQL, configure an admin (postgres) password, and setup the MD5 password authentication. 8.3.5 or higher is the recommended version. Additionally, make sure the postgresql-contrib modules is installed (UUID requires it). Once it is installed, and to make the database accessible from anywhere, so that external developers or yourself can access it easily with PgAdmin3, psql or any other development tool. Locate and edit the postgresql.conf file, and uncomment the following line, assigning this new value:


This makes the database be listening in all the interfaces available in your system and not only in localhost (default).

Locate and edit the pg_hba.conf file, and add this line at the end:

host    all         all          md5

Or if you want more security you can change the with the concrete IP that you want to give access for example

Just for safety purposes, this assumes you have a firewall in your local LAN preventing outsiders to access the database.

Bulbgraph.png   As an example, in Ubuntu 10.04, these file are located in /etc/postgresql/8.4/main, assuming that you have installed PostgreSQL 8.4.x


Do not use Oracle XE 10g. It's 4GB storage limitation makes it useless for heavy development in a few days, and it has a bug that happens usually when using Openbravo ERP. Therefore, the recommended version is Standard Edition 11g (>=

The number of open cursors should be 3000 at least. To verify this:

SELECT value FROM v$parameter WHERE name = 'open_cursors';

To increase it:

ALTER SYSTEM SET open_cursors = 3000 SCOPE=BOTH;

Make sure that the number of processes is 150 at least. To verify this:

SELECT value FROM v$parameter WHERE name = 'processes';

To increase it:

ALTER SYSTEM set processes=150 SCOPE=SPFILE;

And restart Oracle after doing this change.


Follow the installation steps to set up the Sun JDK. Notice that version JDK 1.6 must be used for version >=2.50 developments.

The IBM JDK works well too, but almost all the developers use Sun's version. It is therefore the recommended one.

Apache Ant

Follow the installation steps to set up the Apache Ant. Since version 2.50 Ant needs its memory settings to be tweaked. Otherwise some basic tasks like a compilation are likely to fail. Assuming you are using Bash as your shell, append the following line to your ~/.bashrc file:

export ANT_OPTS="-Xmx1024M -XX:MaxPermSize=128M"

See the Apache Tomcat section for an explanation of what these options mean.

Close your current shell session and open a new one to apply changes.

Apache Tomcat

Do not use the Tomcat version provided by your operating system's package manager

The packaged version of Tomcat is very unfriendly in terms of development due to web application deployment specifics. This especially applies to Linux distributions.

Instead, download the official distribution (version 6.0.x), and extract the files in your home directory. We recommend you to place it in ~/servers/tomcat.

Every Linux distribution and operating system packages Tomcat in a different way, with different security settings, permissions, memory setting and logging configuration. Some of these configurations are not development friendly. This is the reason of the recommendation to use the official distribution.

The default memory settings of Tomcat are not enough for a proper Openbravo ERP functioning. Thus append the following line to your ~/.bashrc

export CATALINA_OPTS="-Djava.awt.headless=true -Xms384M -Xmx512M -XX:MaxPermSize=256M"

Note: In the Openbravo Debian/Ubuntu package, these settings are located in /usr/share/openbravo-erp/etc/openbravoerprc.

These options are the same ones as for production environment, except for the -server option. This is useful only in production servers, because it makes the JVM to use the optimizing compiler instead of the standard one. And while this change increases significantly the performance of the server, it takes longer to warm up. And deployment speed is something that a developer appreciates.

In order to avoid the Unable to find a javac compiler; is not on the classpath. Perhaps JAVA_HOME does not point to the JDK error when trying to compile the application from Tomcat using the Openbravo ERP web interface, add the tools.jar library to Tomcat's classpath:

cp $JAVA_HOME/lib/tools.jar ~/servers/tomcat/lib/

In order to avoid Tomcat from auto-reloading itself, comment the WatchedResource line in conf/context.xml:

<!-- <WatchedResource>WEB-INF/web.xml</WatchedResource> -->

Configure a username and password for the Tomcat Manager, by replacing the conf/tomcat-users.xml file with these contents:

<?xml version='1.0' encoding='utf-8'?>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="admin" password="admin" roles="admin,manager"/>

Replace password="admin" with your own password.

Finally, to start and stop tomcat use the following commands:

cd ~/servers/tomcat/bin


Follow the Mercurial manual for Openbravo developers to install and configure it.

Retrieved from ""

This page has been accessed 23,895 times. This page was last modified on 21 June 2011, at 08:45. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.