OFBiz and PostgreSQL

There are a quite number of Open Source ERP apps out there, but only a few (Compiere/Adempiere, OpenBravo, xTuple, OFBiz) seem to have gained traction. Recently, I tried out OFBiz and getting it to work with PostgreSQL was quite simple. OFBiz is actually shipped with an embedded Java DB (Derby), so for testing or development, you probably don't need an external DB.

I did my test on OpenSolaris 2008.05, so if you use a different version of Solaris or a different OS, the instructions below may vary.

First, check out the source, compile, and run with the embedded database to make sure everything works properly.

  1. Create a directory where you want OFBiz to reside, and run "svn co http://svn.apache.org/repos/asf/ofbiz/trunk ofbiz"
  2. Go to the OFBiz directory (now referred to as $OFBIZDIR), and run "./ant run-install"
  3. In $OFBIZDIR, run "java -jar ofbiz.jar"
  4. Once OFBiz is started, check out the sample app by pointing the browser to http://localhost:8080/ecommerce/

Once your have it working with Derby, follow the steps below to switch to PostgreSQL. I use version 8.3.x.

  1. Assuming you have Postgres installed and ready to go, run:

    postgres $ createuser -S -D -R -P -E ofbiz
    postgres $ createdb -O ofbiz ofbizdb

  2. Edit the OFBiz DB config file in $OFBIZDIR/framework/entity/config/entityengine.xml

    <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
    <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>
    ...
    </delegator>

    <datasource name="localpostnew"
    ...
    <inline-jdbc
    jdbc-driver="org.postgresql.Driver"
    jdbc-uri="jdbc:postgresql://127.0.0.1:5432/ofbizdb"
    jdbc-username="ofbiz"
    jdbc-password="ofbiz"
    isolation-level="ReadCommitted"
    pool-minsize="2"
    pool-maxsize="250"/>
    </datasource>

  3. Copy PostgreSQL JDBC driver to $OFBIZDIR/framework/entity/lib/jdbc. Make sure to use the JDBC4 driver.
  4. Go to $OFBIZDIR, and run "./ant run-install" to populate the data in PostgreSQL
  5. Re/start OFBiz by running "java -jar ofbiz.jar"
  6. Once OFBiz is up and running, you should be able to access http://localhost:8080/ecommerce/

That's all there is to it.

Jignesh has a post on setting up OpenBravo with Postgres on OpenSolaris 2008.05.

Comments:

very useful
;)
thanks Robert

Don't you know also a way to make Compiere work with PostgreSql?
(I've tried with that too, but so far I was just able to make it work with PostgreSql Plus)
I've seen a guide online, but it seems only to be for earlier versions of compiere (ndr 2.5) and postgresql.
I've not been able to set it up yet

steve

Posted by steve on November 14, 2008 at 01:06 AM CST #

Steve,

I haven't worked with Compiere, but according to their website, it only supports EDB Postgres Plus Advanced Server, not PostgreSQL Plus or the community PostgreSQL. You can get more info from this link http://www.compiere.com/products/platform/database.php

Posted by Robert Lor on November 14, 2008 at 01:24 AM CST #

If anyone is interested, we at HotWax Media built out a bunch of helpful OFBiz Tutorials.

Here is the link
http://www.hotwaxmedia.com/control/ofbiz-tutorials.html

Posted by OFBiz Tutorials on May 14, 2010 at 10:00 AM CDT #

I have tried Ofbiz. Ofbiz is good. However, it does not have SMF Manifest for Solaris, and I cannot find someone to support running Ofbiz on Solaris.

Posted by Terence Ng on October 13, 2010 at 01:48 AM CDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

rnl

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today