Posted by
T E Schmitz on
URL: http://ofbiz.116.s1.nabble.com/Users-Using-PostgreSQL-tp137098p137100.html
carlj wrote:
>> I am trying to use Postgre instead of default derby DB. I followed the
>>instructions from Undersun, but have little problem connecting to the
>>database. OFBiz can not connect to it.
>>
>>*My configuration is:* Postgre SQL 7.4.8.
>>*JDBC client database file:* in /ofbiz/framework/entity/lib/jdbc called
>>pg74.216.jdbc3.jar
>>*entityengine.xml has being modified to:*
>>
>>
>>*Error I have:** Exception: org.ofbiz.entity.GenericDataSourceException
>>Message: Unable to esablish a connection with the database. Connection was
>>null!*
Hello Вадим + Carl,
I am running OFBiz with PostgreSQl 7.4. It was pretty straightforward to
set up. I am running an OFBiz revision from last year but hopefully the
following will still be of applicable:
There are only 2 things to set up in OFBiz:
- entityengine.xml
- drop the appropriate driver jar into framework/entity/lib/jdbc
Of course, you need to create the PostgreSQL user + DB before starting
OFBiz:
createuser myuser ...
createdb mydb
The user needs to have the permission to create tables.
In entityengine.xml set up the datasource :
<datasource name="localpostgres"
...
<inline-jdbc
jdbc-driver="org.postgresql.Driver"
jdbc-uri="jdbc:postgresql://<my-ip>:5432/mydb"
jdbc-username="myuser"
jdbc-password="mypass"
isolation-level="ReadCommitted"
pool-minsize="2"
pool-maxsize="20"/>
Comment out the jndi-jdbc stuff.
load the seed data:
java -jar ofbiz.jar -install -readers=seed
and to get started the demo data:
java -jar ofbiz.jar -install -readers=demo
Start OFBiz:
./startofbiz.sh
And Bob's your uncle.
--
Regards,
Tarlika Elisabeth Schmitz