OfBiz Database Installation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

OfBiz Database Installation

Brendan Vogt
Hi,

 

I am new to this kind of setup.  I am a C# programmer, and I am used to
clicking a couple of times then everything is installed and ready to go.  I
am wanting to try out the OfBiz application.

 

After hours of trying to get the source code, I managed to download it.  Now
I am following the installation steps as set out in:

http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setu
p+Guide

 

I am busy with the section under Database Setup.  I have SQL Server 2005,
but want to use Postgres database.  I have it installed as well.  I have
added the JDBC driver .rar in the directory which they said I must.  In the
${ofbiz install dir}/framework/entity/config/entityengine.xml file I have to
set my datasource.  There is already many datasources added.

 

Question

Do I need to change any of the setting for the Postgres database datasource?
DO I keep the other datasources there?

 

Regards,

Brendan

Reply | Threaded
Open this post in threaded view
|

Re: OfBiz Database Installation

BJ Freeman
You select your datasource at the top, see where the derby is setup now.
you can use the postgres datasource as long as you have the right
version and jbc drivers in the configuration.

Brendan Vogt sent the following on 10/20/2007 8:02 AM:

> Hi,
>
>  
>
> I am new to this kind of setup.  I am a C# programmer, and I am used to
> clicking a couple of times then everything is installed and ready to go.  I
> am wanting to try out the OfBiz application.
>
>  
>
> After hours of trying to get the source code, I managed to download it.  Now
> I am following the installation steps as set out in:
>
> http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setu
> p+Guide
>
>  
>
> I am busy with the section under Database Setup.  I have SQL Server 2005,
> but want to use Postgres database.  I have it installed as well.  I have
> added the JDBC driver .rar in the directory which they said I must.  In the
> ${ofbiz install dir}/framework/entity/config/entityengine.xml file I have to
> set my datasource.  There is already many datasources added.
>
>  
>
> Question
>
> Do I need to change any of the setting for the Postgres database datasource?
> DO I keep the other datasources there?
>
>  
>
> Regards,
>
> Brendan
>
>
Reply | Threaded
Open this post in threaded view
|

RE: OfBiz Database Installation

SkipDever
In reply to this post by Brendan Vogt
Brendan

Here is what I do.  If i have the database on a different server, I create a
new postgres setup with a name that reflects the server it is on.
Otherwise, I use the existing localpostgres.  For example, if I have the
database server on data41, I have a database entry named data41postgres.  I
just copy and past the localpostgres section, give it a new name and change
the settings to reflect the postgres insstall and location.


Then, all you have to do is change default entity reader:

    <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="localderby"/>
    </delegator>

to:

    <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="data41postgres"/>
    </delegator>

or, if you are running postgres on the same machine:

    <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="localpostgres"/>
    </delegator>

If you set up postgres to use ofbiz as the database name and user and
password as shown, your done.  Otherwise, modify the ofbiz postgres settings
to mirror what you set up in postgres.

Here's a link with more complete instructions:
http://www.opentaps.org/index.php?option=com_content&task=view&id=38&Itemid=
62

Cheers

Skip

-----Original Message-----
From: Brendan Vogt [mailto:[hidden email]]
Sent: Saturday, October 20, 2007 8:03 AM
To: [hidden email]
Subject: OfBiz Database Installation


Hi,



I am new to this kind of setup.  I am a C# programmer, and I am used to
clicking a couple of times then everything is installed and ready to go.  I
am wanting to try out the OfBiz application.



After hours of trying to get the source code, I managed to download it.  Now
I am following the installation steps as set out in:

http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setu
p+Guide



I am busy with the section under Database Setup.  I have SQL Server 2005,
but want to use Postgres database.  I have it installed as well.  I have
added the JDBC driver .rar in the directory which they said I must.  In the
${ofbiz install dir}/framework/entity/config/entityengine.xml file I have to
set my datasource.  There is already many datasources added.



Question

Do I need to change any of the setting for the Postgres database datasource?
DO I keep the other datasources there?



Regards,

Brendan


Reply | Threaded
Open this post in threaded view
|

RE: OfBiz Database Installation

Brendan Vogt
In reply to this post by BJ Freeman
You speak of " as you have the right
version and jbc drivers in the configuration".  What do you mean of right
version and jdbc drivers in the configuration?

I have copied the jdbc driver for Postgres database to:

...\TestOfBiz\framework\entity\lib\jdbc

Do I have to specify anything else in the entityengine.xml file found in
...\TestOfBiz\framework\entity\config or should I leave it as is?


-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Saturday, October 20, 2007 6:39 PM
To: [hidden email]
Subject: Re: OfBiz Database Installation

You select your datasource at the top, see where the derby is setup now.
you can use the postgres datasource as long as you have the right
version and jbc drivers in the configuration.

Brendan Vogt sent the following on 10/20/2007 8:02 AM:
> Hi,
>
>  
>
> I am new to this kind of setup.  I am a C# programmer, and I am used to
> clicking a couple of times then everything is installed and ready to go.
I
> am wanting to try out the OfBiz application.
>
>  
>
> After hours of trying to get the source code, I managed to download it.
Now
> I am following the installation steps as set out in:
>
>
http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setu
> p+Guide
>
>  
>
> I am busy with the section under Database Setup.  I have SQL Server 2005,
> but want to use Postgres database.  I have it installed as well.  I have
> added the JDBC driver .rar in the directory which they said I must.  In
the
> ${ofbiz install dir}/framework/entity/config/entityengine.xml file I have
to
> set my datasource.  There is already many datasources added.
>
>  
>
> Question
>
> Do I need to change any of the setting for the Postgres database
datasource?
> DO I keep the other datasources there?
>
>  
>
> Regards,
>
> Brendan
>
>

Reply | Threaded
Open this post in threaded view
|

Re: OfBiz Database Installation

BJ Freeman
postgres SQL standard for many linux boxes is 7.4
however there are newer versions like 8.2.4
they require thier own Jbc drivers
you can find these on
http://www.postgresql.org/download/

comment out the derby and replace it with

 <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="localpostgres"/>
    </delegator>
    <delegator name="default-no-eca" entity-model-reader="main"
entity-group-reader="main" entity-eca-reader="main"
entity-eca-enabled="false" distributed-cache-clear-enabled="false">
        <group-map group-name="org.ofbiz" datasource-name="localpostgres"/>
    </delegator>

when you setup you postgres besure to create a DB per the localpostgres
section for usr and password.




Brendan Vogt sent the following on 10/20/2007 12:33 PM:

> You speak of " as you have the right
> version and jbc drivers in the configuration".  What do you mean of right
> version and jdbc drivers in the configuration?
>
> I have copied the jdbc driver for Postgres database to:
>
> ...\TestOfBiz\framework\entity\lib\jdbc
>
> Do I have to specify anything else in the entityengine.xml file found in
> ...\TestOfBiz\framework\entity\config or should I leave it as is?
>
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Saturday, October 20, 2007 6:39 PM
> To: [hidden email]
> Subject: Re: OfBiz Database Installation
>
> You select your datasource at the top, see where the derby is setup now.
> you can use the postgres datasource as long as you have the right
> version and jbc drivers in the configuration.
>
> Brendan Vogt sent the following on 10/20/2007 8:02 AM:
>> Hi,
>>
>>  
>>
>> I am new to this kind of setup.  I am a C# programmer, and I am used to
>> clicking a couple of times then everything is installed and ready to go.
> I
>> am wanting to try out the OfBiz application.
>>
>>  
>>
>> After hours of trying to get the source code, I managed to download it.
> Now
>> I am following the installation steps as set out in:
>>
>>
> http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setu
>> p+Guide
>>
>>  
>>
>> I am busy with the section under Database Setup.  I have SQL Server 2005,
>> but want to use Postgres database.  I have it installed as well.  I have
>> added the JDBC driver .rar in the directory which they said I must.  In
> the
>> ${ofbiz install dir}/framework/entity/config/entityengine.xml file I have
> to
>> set my datasource.  There is already many datasources added.
>>
>>  
>>
>> Question
>>
>> Do I need to change any of the setting for the Postgres database
> datasource?
>> DO I keep the other datasources there?
>>
>>  
>>
>> Regards,
>>
>> Brendan
>>
>>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: OfBiz Database Installation

Brendan Vogt
In reply to this post by SkipDever
Do I have to go and create a database before I run the build.xml file??  I
got millions of errors while running the build.xml file with ant
run-install.

Here is what I could see, please help me:

     [java] ---- exception report
----------------------------------------------
------------
     [java] [TransactionUtil.setRollbackOnly] Calling transaction
setRollbackOnl
y; this stack trace shows where this is happening:
     [java] Exception: java.lang.Exception
     [java] Message: Failure in storeAll operation:
org.ofbiz.entity.GenericData
SourceException: Unable to esablish a connection with the database. (Unable
to a
cquire a new connection from the pool). Rolling back transaction.
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] java.lang.Exception: Failure in storeAll operation:
org.ofbiz.entity
.GenericDataSourceException: Unable to esablish a connection with the
database.
(Unable to acquire a new connection from the pool). Rolling back
transaction.
     [java]
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(Transac
tionUtil.java:298)
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
l.java:245)
     [java]
org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:129
2)
     [java]
org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
va:282)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main) [
EntitySaxReader.java:267:ERROR]

     [java] ---- exception report
----------------------------------------------
------------
     [java] An error occurred saving the data, rolling back transaction
(true)
     [java] Exception: org.ofbiz.entity.GenericDataSourceException
     [java] Message: Unable to esablish a connection with the database.
(Unable
to acquire a new connection from the pool)
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] org.ofbiz.entity.GenericDataSourceException: Unable to esablish
a co
nnection with the database. (Unable to acquire a new connection from the
pool)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:2
62)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:365)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:349)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:514)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:485)
     [java]
org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(Generi
cHelperDAO.java:80)
     [java]
org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:124
5)
     [java]
org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
va:282)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java] java.sql.SQLException: Unable to acquire a new connection from
the p
ool
     [java]
org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionS
tatus(ManagedConnection.java:120)
     [java]
org.apache.commons.dbcp.managed.ManagedConnection.<init>(ManagedConn
ection.java:55)
     [java]
org.apache.commons.dbcp.managed.ManagedDataSource.getConnection(Mana
gedDataSource.java:77)
     [java]
org.ofbiz.entity.connection.DBCPConnectionFactory.getConnection(DBCP
ConnectionFactory.java:35)
     [java]
org.ofbiz.entity.jdbc.ConnectionFactory.getManagedConnection(Connect
ionFactory.java:128)
     [java]
org.ofbiz.geronimo.GeronimoTransactionFactory.getConnection(Geronimo
TransactionFactory.java:92)
     [java]
org.ofbiz.entity.transaction.TransactionFactory.getConnection(Transa
ctionFactory.java:95)
     [java]
org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFact
ory.java:73)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:2
59)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:365)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:349)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:514)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:485)
     [java]
org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(Generi
cHelperDAO.java:80)
     [java]
org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:124
5)
     [java]
org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
va:282)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java] Caused by: org.postgresql.util.PSQLException: FATAL: password
authen
tication failed for user "ofbiz"
     [java]
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(Connec
tionFactoryImpl.java:275)
     [java]
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Conn
ectionFactoryImpl.java:94)
     [java]
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFacto
ry.java:66)
     [java]
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Con
nection.java:125)
     [java]
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Con
nection.java:30)
     [java]
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Con
nection.java:18)
     [java]
org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)

     [java] org.postgresql.Driver.makeConnection(Driver.java:382)
     [java] org.postgresql.Driver.connect(Driver.java:260)
     [java]
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Dri
verConnectionFactory.java:38)
     [java]
org.apache.commons.dbcp.managed.LocalXAConnectionFactory.createConne
ction(LocalXAConnectionFactory.java:62)
     [java]
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolabl
eConnectionFactory.java:294)
     [java]
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:840)
     [java]
org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionS
tatus(ManagedConnection.java:117)
     [java]     ... 24 more
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main) [
TransactionUtil.java:262:ERROR]

     [java] ---- exception report
----------------------------------------------
------------
     [java] [TransactionUtil.rollback]
     [java] Exception: java.lang.Exception
     [java] Message: Stack Trace
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] java.lang.Exception: Stack Trace
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
l.java:261)
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
l.java:243)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:268
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main) [
TransactionUtil.java:272:INFO ]
[TransactionUtil.rollback] transaction rolled back
     [java] 2007-10-20 21:59:14,468 (main) [
EntityDataLoader.java:215:ERROR]

     [java] ---- exception report
----------------------------------------------
------------
     [java] [install.loadData]: Error loading XML Resource
"file:/C:/Development
/Java/Eclipse/workspace/TestOfBiz/specialpurpose/cmssite/data/CmsSiteDemoDat
a.xm
l"; Error was: A transaction error occurred reading data
     [java] Exception: org.xml.sax.SAXException
     [java] Message: A transaction error occurred reading data
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] org.ofbiz.entity.GenericDataSourceException: Unable to esablish
a co
nnection with the database. (Unable to acquire a new connection from the
pool)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:269
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:279:INF
O ] =-=-=-=-=-=-= Here is a summary of the data load:
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/security/data/SecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CommonSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CommonTypeData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CountryCodeData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CurrencyData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_AU.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_BR.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_ES.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_IT.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_NL.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_US.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_UK.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_IRL.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/LanguageData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/UnitData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/PeriodData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/service/data/ScheduledServiceData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/service/data/ScheduledServices.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/service/data/ServiceSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/entityext/data/EntityExtTypeData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/entityext/data/EntityScheduledServices.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/entityext/data/EntityExtSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/workflow/data/WorkFlowSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/webtools/data/WebtoolsSecurityData.xml

BUILD SUCCESSFUL
Total time: 3 minutes 58 seconds
C:\Development\Java\Eclipse\workspace\TestOfBiz>

Reply | Threaded
Open this post in threaded view
|

RE: OfBiz Database Installation

SkipDever
Brendan

Once again, if you insist on using postgres to get started, here is a link
with step-by-step instructions:

http://www.opentaps.org/index.php?option=com_content&task=view&id=38&Itemid=
62

To answer your question, yes, you have to create the database before
run-install

Skip

-----Original Message-----
From: Brendan Vogt [mailto:[hidden email]]
Sent: Saturday, October 20, 2007 1:05 PM
To: [hidden email]
Subject: RE: OfBiz Database Installation


Do I have to go and create a database before I run the build.xml file??  I
got millions of errors while running the build.xml file with ant
run-install.

Here is what I could see, please help me:

     [java] ---- exception report
----------------------------------------------
------------
     [java] [TransactionUtil.setRollbackOnly] Calling transaction
setRollbackOnl
y; this stack trace shows where this is happening:
     [java] Exception: java.lang.Exception
     [java] Message: Failure in storeAll operation:
org.ofbiz.entity.GenericData
SourceException: Unable to esablish a connection with the database. (Unable
to a
cquire a new connection from the pool). Rolling back transaction.
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] java.lang.Exception: Failure in storeAll operation:
org.ofbiz.entity
.GenericDataSourceException: Unable to esablish a connection with the
database.
(Unable to acquire a new connection from the pool). Rolling back
transaction.
     [java]
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(Transac
tionUtil.java:298)
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
l.java:245)
     [java]
org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:129
2)
     [java]
org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
va:282)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main) [
EntitySaxReader.java:267:ERROR]

     [java] ---- exception report
----------------------------------------------
------------
     [java] An error occurred saving the data, rolling back transaction
(true)
     [java] Exception: org.ofbiz.entity.GenericDataSourceException
     [java] Message: Unable to esablish a connection with the database.
(Unable
to acquire a new connection from the pool)
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] org.ofbiz.entity.GenericDataSourceException: Unable to esablish
a co
nnection with the database. (Unable to acquire a new connection from the
pool)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:2
62)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:365)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:349)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:514)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:485)
     [java]
org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(Generi
cHelperDAO.java:80)
     [java]
org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:124
5)
     [java]
org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
va:282)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java] java.sql.SQLException: Unable to acquire a new connection from
the p
ool
     [java]
org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionS
tatus(ManagedConnection.java:120)
     [java]
org.apache.commons.dbcp.managed.ManagedConnection.<init>(ManagedConn
ection.java:55)
     [java]
org.apache.commons.dbcp.managed.ManagedDataSource.getConnection(Mana
gedDataSource.java:77)
     [java]
org.ofbiz.entity.connection.DBCPConnectionFactory.getConnection(DBCP
ConnectionFactory.java:35)
     [java]
org.ofbiz.entity.jdbc.ConnectionFactory.getManagedConnection(Connect
ionFactory.java:128)
     [java]
org.ofbiz.geronimo.GeronimoTransactionFactory.getConnection(Geronimo
TransactionFactory.java:92)
     [java]
org.ofbiz.entity.transaction.TransactionFactory.getConnection(Transa
ctionFactory.java:95)
     [java]
org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFact
ory.java:73)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:2
59)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:365)
     [java]
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
a:349)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:514)
     [java]
org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:485)
     [java]
org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(Generi
cHelperDAO.java:80)
     [java]
org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:124
5)
     [java]
org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
va:282)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java] Caused by: org.postgresql.util.PSQLException: FATAL: password
authen
tication failed for user "ofbiz"
     [java]
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(Connec
tionFactoryImpl.java:275)
     [java]
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Conn
ectionFactoryImpl.java:94)
     [java]
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFacto
ry.java:66)
     [java]
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Con
nection.java:125)
     [java]
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Con
nection.java:30)
     [java]
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Con
nection.java:18)
     [java]
org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)

     [java] org.postgresql.Driver.makeConnection(Driver.java:382)
     [java] org.postgresql.Driver.connect(Driver.java:260)
     [java]
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Dri
verConnectionFactory.java:38)
     [java]
org.apache.commons.dbcp.managed.LocalXAConnectionFactory.createConne
ction(LocalXAConnectionFactory.java:62)
     [java]
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolabl
eConnectionFactory.java:294)
     [java]
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:840)
     [java]
org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionS
tatus(ManagedConnection.java:117)
     [java]     ... 24 more
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main) [
TransactionUtil.java:262:ERROR]

     [java] ---- exception report
----------------------------------------------
------------
     [java] [TransactionUtil.rollback]
     [java] Exception: java.lang.Exception
     [java] Message: Stack Trace
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] java.lang.Exception: Stack Trace
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
l.java:261)
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
l.java:243)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:268
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main) [
TransactionUtil.java:272:INFO ]
[TransactionUtil.rollback] transaction rolled back
     [java] 2007-10-20 21:59:14,468 (main) [
EntityDataLoader.java:215:ERROR]

     [java] ---- exception report
----------------------------------------------
------------
     [java] [install.loadData]: Error loading XML Resource
"file:/C:/Development
/Java/Eclipse/workspace/TestOfBiz/specialpurpose/cmssite/data/CmsSiteDemoDat
a.xm
l"; Error was: A transaction error occurred reading data
     [java] Exception: org.xml.sax.SAXException
     [java] Message: A transaction error occurred reading data
     [java] ---- stack trace
---------------------------------------------------
------------
     [java] org.ofbiz.entity.GenericDataSourceException: Unable to esablish
a co
nnection with the database. (Unable to acquire a new connection from the
pool)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:269
)
     [java]
org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
)
     [java]
org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
a:211)
     [java]
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
dContainer.java:267)
     [java]
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
79)
     [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
     [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
     [java] org.ofbiz.base.start.Start.start(Start.java:314)
     [java] org.ofbiz.base.start.Start.main(Start.java:397)
     [java]
--------------------------------------------------------------------
------------
     [java]
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:279:INF
O ] =-=-=-=-=-=-= Here is a summary of the data load:
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/security/data/SecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CommonSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CommonTypeData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CountryCodeData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/CurrencyData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_AU.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_BR.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_ES.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_IT.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_NL.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_US.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_UK.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/GeoData_IRL.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/LanguageData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/UnitData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/common/data/PeriodData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/service/data/ScheduledServiceData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/service/data/ScheduledServices.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/service/data/ServiceSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/entityext/data/EntityExtTypeData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/entityext/data/EntityScheduledServices.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/entityext/data/EntityExtSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/workflow/data/WorkFlowSecurityData.xml
     [java] 2007-10-20 21:59:14,468 (main)
[EntityDataLoadContainer.java:282:INF
O ] 00000 of 00000 from
file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
amework/webtools/data/WebtoolsSecurityData.xml

BUILD SUCCESSFUL
Total time: 3 minutes 58 seconds
C:\Development\Java\Eclipse\workspace\TestOfBiz>


Reply | Threaded
Open this post in threaded view
|

Re: OfBiz Database Installation

BJ Freeman
In reply to this post by Brendan Vogt
if you read
http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide
you will see that db setup is before intitialzation.
this means all the dB setup
visiting the http://www.postgresql.org/docs/ will help understand how to
deal with that db.

Brendan Vogt sent the following on 10/20/2007 1:04 PM:

> Do I have to go and create a database before I run the build.xml file??  I
> got millions of errors while running the build.xml file with ant
> run-install.
>
> Here is what I could see, please help me:
>
>      [java] ---- exception report
> ----------------------------------------------
> ------------
>      [java] [TransactionUtil.setRollbackOnly] Calling transaction
> setRollbackOnl
> y; this stack trace shows where this is happening:
>      [java] Exception: java.lang.Exception
>      [java] Message: Failure in storeAll operation:
> org.ofbiz.entity.GenericData
> SourceException: Unable to esablish a connection with the database. (Unable
> to a
> cquire a new connection from the pool). Rolling back transaction.
>      [java] ---- stack trace
> ---------------------------------------------------
> ------------
>      [java] java.lang.Exception: Failure in storeAll operation:
> org.ofbiz.entity
> .GenericDataSourceException: Unable to esablish a connection with the
> database.
> (Unable to acquire a new connection from the pool). Rolling back
> transaction.
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(Transac
> tionUtil.java:298)
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
> l.java:245)
>      [java]
> org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:129
> 2)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
> va:282)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
> )
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
> )
>      [java]
> org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
> a:211)
>      [java]
> org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
> dContainer.java:267)
>      [java]
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
> 79)
>      [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
>      [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
>      [java] org.ofbiz.base.start.Start.start(Start.java:314)
>      [java] org.ofbiz.base.start.Start.main(Start.java:397)
>      [java]
> --------------------------------------------------------------------
> ------------
>      [java]
>      [java] 2007-10-20 21:59:14,468 (main) [
> EntitySaxReader.java:267:ERROR]
>
>      [java] ---- exception report
> ----------------------------------------------
> ------------
>      [java] An error occurred saving the data, rolling back transaction
> (true)
>      [java] Exception: org.ofbiz.entity.GenericDataSourceException
>      [java] Message: Unable to esablish a connection with the database.
> (Unable
> to acquire a new connection from the pool)
>      [java] ---- stack trace
> ---------------------------------------------------
> ------------
>      [java] org.ofbiz.entity.GenericDataSourceException: Unable to esablish
> a co
> nnection with the database. (Unable to acquire a new connection from the
> pool)
>      [java]
> org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:2
> 62)
>      [java]
> org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
> a:365)
>      [java]
> org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
> a:349)
>      [java]
> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:514)
>      [java]
> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:485)
>      [java]
> org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(Generi
> cHelperDAO.java:80)
>      [java]
> org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:124
> 5)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
> va:282)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
> )
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
> )
>      [java]
> org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
> a:211)
>      [java]
> org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
> dContainer.java:267)
>      [java]
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
> 79)
>      [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
>      [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
>      [java] org.ofbiz.base.start.Start.start(Start.java:314)
>      [java] org.ofbiz.base.start.Start.main(Start.java:397)
>      [java] java.sql.SQLException: Unable to acquire a new connection from
> the p
> ool
>      [java]
> org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionS
> tatus(ManagedConnection.java:120)
>      [java]
> org.apache.commons.dbcp.managed.ManagedConnection.<init>(ManagedConn
> ection.java:55)
>      [java]
> org.apache.commons.dbcp.managed.ManagedDataSource.getConnection(Mana
> gedDataSource.java:77)
>      [java]
> org.ofbiz.entity.connection.DBCPConnectionFactory.getConnection(DBCP
> ConnectionFactory.java:35)
>      [java]
> org.ofbiz.entity.jdbc.ConnectionFactory.getManagedConnection(Connect
> ionFactory.java:128)
>      [java]
> org.ofbiz.geronimo.GeronimoTransactionFactory.getConnection(Geronimo
> TransactionFactory.java:92)
>      [java]
> org.ofbiz.entity.transaction.TransactionFactory.getConnection(Transa
> ctionFactory.java:95)
>      [java]
> org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFact
> ory.java:73)
>      [java]
> org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:2
> 59)
>      [java]
> org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
> a:365)
>      [java]
> org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav
> a:349)
>      [java]
> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:514)
>      [java]
> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:485)
>      [java]
> org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(Generi
> cHelperDAO.java:80)
>      [java]
> org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:124
> 5)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.ja
> va:282)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:261
> )
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
> )
>      [java]
> org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
> a:211)
>      [java]
> org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
> dContainer.java:267)
>      [java]
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
> 79)
>      [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
>      [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
>      [java] org.ofbiz.base.start.Start.start(Start.java:314)
>      [java] org.ofbiz.base.start.Start.main(Start.java:397)
>      [java] Caused by: org.postgresql.util.PSQLException: FATAL: password
> authen
> tication failed for user "ofbiz"
>      [java]
> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(Connec
> tionFactoryImpl.java:275)
>      [java]
> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Conn
> ectionFactoryImpl.java:94)
>      [java]
> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFacto
> ry.java:66)
>      [java]
> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Con
> nection.java:125)
>      [java]
> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Con
> nection.java:30)
>      [java]
> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Con
> nection.java:18)
>      [java]
> org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
>
>      [java] org.postgresql.Driver.makeConnection(Driver.java:382)
>      [java] org.postgresql.Driver.connect(Driver.java:260)
>      [java]
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Dri
> verConnectionFactory.java:38)
>      [java]
> org.apache.commons.dbcp.managed.LocalXAConnectionFactory.createConne
> ction(LocalXAConnectionFactory.java:62)
>      [java]
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolabl
> eConnectionFactory.java:294)
>      [java]
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericO
> bjectPool.java:840)
>      [java]
> org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionS
> tatus(ManagedConnection.java:117)
>      [java]     ... 24 more
>      [java]
> --------------------------------------------------------------------
> ------------
>      [java]
>      [java] 2007-10-20 21:59:14,468 (main) [
> TransactionUtil.java:262:ERROR]
>
>      [java] ---- exception report
> ----------------------------------------------
> ------------
>      [java] [TransactionUtil.rollback]
>      [java] Exception: java.lang.Exception
>      [java] Message: Stack Trace
>      [java] ---- stack trace
> ---------------------------------------------------
> ------------
>      [java] java.lang.Exception: Stack Trace
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
> l.java:261)
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUti
> l.java:243)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:268
> )
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
> )
>      [java]
> org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
> a:211)
>      [java]
> org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
> dContainer.java:267)
>      [java]
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
> 79)
>      [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
>      [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
>      [java] org.ofbiz.base.start.Start.start(Start.java:314)
>      [java] org.ofbiz.base.start.Start.main(Start.java:397)
>      [java]
> --------------------------------------------------------------------
> ------------
>      [java]
>      [java] 2007-10-20 21:59:14,468 (main) [
> TransactionUtil.java:272:INFO ]
> [TransactionUtil.rollback] transaction rolled back
>      [java] 2007-10-20 21:59:14,468 (main) [
> EntityDataLoader.java:215:ERROR]
>
>      [java] ---- exception report
> ----------------------------------------------
> ------------
>      [java] [install.loadData]: Error loading XML Resource
> "file:/C:/Development
> /Java/Eclipse/workspace/TestOfBiz/specialpurpose/cmssite/data/CmsSiteDemoDat
> a.xm
> l"; Error was: A transaction error occurred reading data
>      [java] Exception: org.xml.sax.SAXException
>      [java] Message: A transaction error occurred reading data
>      [java] ---- stack trace
> ---------------------------------------------------
> ------------
>      [java] org.ofbiz.entity.GenericDataSourceException: Unable to esablish
> a co
> nnection with the database. (Unable to acquire a new connection from the
> pool)
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:269
> )
>      [java]
> org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:218
> )
>      [java]
> org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.jav
> a:211)
>      [java]
> org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoa
> dContainer.java:267)
>      [java]
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:
> 79)
>      [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:261)
>      [java] org.ofbiz.base.start.Start.startServer(Start.java:310)
>      [java] org.ofbiz.base.start.Start.start(Start.java:314)
>      [java] org.ofbiz.base.start.Start.main(Start.java:397)
>      [java]
> --------------------------------------------------------------------
> ------------
>      [java]
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:279:INF
> O ] =-=-=-=-=-=-= Here is a summary of the data load:
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/security/data/SecurityData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/CommonSecurityData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/CommonTypeData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/CountryCodeData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/CurrencyData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_AU.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_BR.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_ES.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_IT.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_NL.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_US.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_UK.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/GeoData_IRL.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/LanguageData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/UnitData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/common/data/PeriodData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/service/data/ScheduledServiceData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/service/data/ScheduledServices.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/service/data/ServiceSecurityData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/entityext/data/EntityExtTypeData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/entityext/data/EntityScheduledServices.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/entityext/data/EntityExtSecurityData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/workflow/data/WorkFlowSecurityData.xml
>      [java] 2007-10-20 21:59:14,468 (main)
> [EntityDataLoadContainer.java:282:INF
> O ] 00000 of 00000 from
> file:/C:/Development/Java/Eclipse/workspace/TestOfBiz/fr
> amework/webtools/data/WebtoolsSecurityData.xml
>
> BUILD SUCCESSFUL
> Total time: 3 minutes 58 seconds
> C:\Development\Java\Eclipse\workspace\TestOfBiz>
>
>
>
>