Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029275Openbravo ERPA. Platformpublic2015-03-13 15:282022-02-01 08:05
egoitz 
Triage Platform Base 
normalminoralways
acknowledgedopen 
5
 
 
Core
No
0029275: Executing an smartbuild uses a Openbravo.properties located on a config folder on the same level than the installation folder
When executing an smartbuild the Openbravo.properties file is use to get the data to connect the database.
By default the file is located on the config folder on the Openbravo installation folder.
If for any case you have a config folder on the parent folder of the OPenbravo installation folder with a Openbravo.properties file, that file is used.

If it is not correct you will get a error.
Having a Openbravo installation working on the following folder:
/opt/OpenbravoERP
copy the config folder to have also the config folder on the following location:
/opt/config
Change the
/opt/config/Openbravo.properties to point to a not existint database
Go to /opt/OpenbravoERP
execute ant smartubuild
You get a error

generate.entities.quick:
     [java] 0 [main] INFO org.openbravo.base.gen.GenerateEntitiesTask - Model has not changed since last run, not re-generating entities
     [java] 59 [main] ERROR org.openbravo.database.ConnectionProviderImpl - Error getting connection
     [java] org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
     [java] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
     [java] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
     [java] at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
     [java] at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
     [java] at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
     [java] at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
     [java] at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
The issue is in OBRebuildAppender:
if (new File("../../config/Openbravo.properties").exists())
fProp = new File("../../config/Openbravo.properties");
else if (new File("../config/Openbravo.properties").exists())
fProp = new File("../config/Openbravo.properties");
else if (new File("config/Openbravo.properties").exists())
fProp = new File("config/Openbravo.properties");
No tags attached.
Issue History
2015-03-13 15:28egoitzNew Issue
2015-03-13 15:28egoitzAssigned To => AugustoMauch
2015-03-13 15:28egoitzModules => Core
2015-03-13 15:28egoitzTriggers an Emergency Pack => No
2015-03-16 08:00alostaleStatusnew => acknowledged
2015-03-17 14:37alostaleAssigned ToAugustoMauch => platform
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.