Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029608Openbravo ERPA. Platformpublic2015-04-16 10:562015-05-07 22:16
alostale 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q3 
AugustoMauch
Core
Packaging and release
2015-01-26
main
https://code.openbravo.com/erp/devel/pi/rev/ad079bdad031de6cb0c8cf7cb8a82d264950e6db [^]
No
0029608: System cannot be rebuilt having Tomcat JDBC Pool
System cannot be rebuilt having Tomcat JDBC Pool configured because errors are obtained in generate.entities task.
* Install and configure Tomcat JDBC Pool module (http://wiki.openbravo.com/wiki/Modules:Tomcat_JDBC_Connection_Pool [^])
* run ant smartbuild
  --> This error is got

generate.entities.quick:
     [java] 220 [main] INFO org.openbravo.base.session.OBPropertiesProvider - Setting Openbravo.properties through file: /home/alostale/ws/pi-pg/openbravo/config/Openbravo.properties
     [java] 240 [main] ERROR org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool - Error while retrieving connection:
     [java] java.sql.SQLException
     [java] at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:243)
     [java] at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:176)
     [java] at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:653)
     [java] at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:595)
     [java] at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:458)
     [java] at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:130)
     [java] at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:99)
     [java] at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:110)
     [java] at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnection(JdbcExternalConnectionPool.java:60)
     [java] at org.openbravo.database.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:225)
     [java] at org.openbravo.database.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:209)
     [java] at org.openbravo.utils.OBRebuildAppender.append(OBRebuildAppender.java:65)
     [java] at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
     [java] at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
     [java] at org.apache.log4j.Category.callAppenders(Category.java:206)
     [java] at org.apache.log4j.Category.forcedLog(Category.java:391)
     [java] at org.apache.log4j.Category.info(Category.java:666)
     [java] at org.openbravo.base.session.OBPropertiesProvider.setProperties(OBPropertiesProvider.java:132)
     [java] at org.openbravo.base.session.OBPropertiesProvider.readPropertiesFromDevelopmentProject(OBPropertiesProvider.java:168)
     [java] at org.openbravo.base.session.OBPropertiesProvider.getOpenbravoProperties(OBPropertiesProvider.java:70)
...
The problem is caused because rebuild tasks use OBRebuildAppender which logs in DB all messages with a level equal or higher than INFO, pool module gets the Openbravo.properties using OBPropertiesProvider which tries to log with info level the file the properties are in before they are set, this tries to log in DB invoking again the OBPropertiesProvider, this results in an error.

OBPropertiesProvider shouldn't log any INFO level message while setting the properties.
No tags attached.
depends on backport 00296093.0PR15Q2 closed alostale System cannot be rebuilt having Tomcat JDBC Pool 
caused by feature request 0028605 closed alostale define different properties in Tomcat clustering environments 
Issue History
2015-04-16 10:56alostaleNew Issue
2015-04-16 10:56alostaleAssigned To => platform
2015-04-16 10:56alostaleModules => Core
2015-04-16 10:56alostaleTriggers an Emergency Pack => No
2015-04-16 10:59alostaleRegression level => Packaging and release
2015-04-16 10:59alostaleRegression date => 2015-01-26
2015-04-16 10:59alostaleRegression introduced in release => main
2015-04-16 10:59alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/ad079bdad031de6cb0c8cf7cb8a82d264950e6db [^]
2015-04-16 10:59alostaleRelationship addedcaused by 0028605
2015-04-16 11:01alostaleReview Assigned To => inigosanchez
2015-04-16 11:01alostaleReview Assigned Toinigosanchez => AugustoMauch
2015-04-16 11:01alostaleStatusnew => scheduled
2015-04-16 11:01alostaleAssigned Toplatform => alostale
2015-04-16 11:09hgbotCheckin
2015-04-16 11:09hgbotNote Added: 0076578
2015-04-16 11:09hgbotStatusscheduled => resolved
2015-04-16 11:09hgbotResolutionopen => fixed
2015-04-16 11:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/12ef70e781867e2226d50fa4ed02db4e42667339 [^]
2015-04-24 09:04AugustoMauchNote Added: 0076739
2015-04-24 09:04AugustoMauchStatusresolved => closed
2015-04-24 09:04AugustoMauchFixed in Version => 3.0PR15Q3
2015-05-07 22:16hudsonbotCheckin
2015-05-07 22:16hudsonbotNote Added: 0077133

Notes
(0076578)
hgbot   
2015-04-16 11:09   
Repository: erp/devel/pi
Changeset: 12ef70e781867e2226d50fa4ed02db4e42667339
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Apr 16 11:06:30 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/12ef70e781867e2226d50fa4ed02db4e42667339 [^]

fixed bug 29608: System cannot be rebuilt having Tomcat JDBC Pool

  OBPropertiesProvider.setProperties method was invoked when rebuilding
  to get a connection, as this method tried to log with INFO level, it caused
  recursive invokations.

  Messages logged while setting properties have been lowered to DEBUG to prevent
  this situation.

---
M src/org/openbravo/base/session/OBPropertiesProvider.java
---
(0076739)
AugustoMauch   
2015-04-24 09:04   
Code reviewed and verified in pi@12ef70e78186
(0077133)
hudsonbot   
2015-05-07 22:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/a1817f84bd8b [^]
Maturity status: Test