Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030919
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2015-09-24 12:222015-11-23 21:16
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR16Q1
StatusclosedFix in branchFixed in SCM revision7f26d269ea39
ProjectionnoneETAnoneTarget Version3.0PR16Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2011-01-19
Regression introduced in release3.0RC4
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/7fc34fd92373 [^]
Triggers an Emergency PackNo
Summary

0030919: can't use DB connection defined as JNDI service

DescriptionIt is not possible to use DB connection defined as JNDI service because even having it configured, direct connection is tried to be created in some places.

The behavior is different depending on OB version:

* 3.0RC4-current pi (pre PR15Q4), this error is risen:
   [main] ERROR org.openbravo.database.ConnectionProviderImpl - Error getting connection java.sql.SQLException: No suitable driver found for null/null
    at java.sql.DriverManager.getConnection(DriverManager.java:689)
    at java.sql.DriverManager.getConnection(DriverManager.java:270)
    at org.openbravo.database.OpenbravoDriverManagerConnectionFactory.createConnection(OpenbravoDriverManagerConnectionFactory.java:55)
* current pi (pre PR15Q4), in same place a ClassCastException is thrown trying to cast JNDIConnectionProvider to ConnectionProviderImpl

Additionally, when it is combined with JdbcExternalConnectionPool:
* it tries to create two pools: one for DAL and another one for xsql connections
* DAL connections try to use direct DB connection rather than JNDI resulting in NPE if those properties are not set
Steps To Reproduce* Configure Openbravo to use JNDI (removing the rest of direct DB connection settings) [1] removing from Openbravo.properties settings to use direct DB connection
* Start Tomcat

[1] follow documentation in http://wiki.openbravo.com/wiki/Projects:JNDI_Service/Technical_Documentation [^] until 0030918 is fixed
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0030918 acknowledgedTriage Platform Base missing user documentation for jndi db connection 
related to feature request 00295643.0PR15Q4 closedinigosanchez Include Connection Pool module into distribution 
depends on backport 00309203.0PR15Q3.3 closedplatform can't use DB connection defined as JNDI service 
depends on backport 00309213.0PR15Q2.6 closedplatform can't use DB connection defined as JNDI service 

-  Notes
(0081182)
hgbot (developer)
2015-10-22 07:39

Repository: erp/devel/pi
Changeset: 7f26d269ea390bc6eb51b9200da4cc4f2c020984
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Oct 21 12:21:21 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7f26d269ea390bc6eb51b9200da4cc4f2c020984 [^]

fixed bug 30919: can't use DB connection defined as JNDI service

  Several problems fixed:
   * Even configured, JNDI was not used in ModelProvider.initializeReferenceClasses
     method
   * Casting exception was thrown in ModelProvider.initializeReferenceClasses
   * When Tomcat Pool was configured as external pool and also JDNI datasource
     was configured, it was not properly managed. Now the pool is used and JNDI
     datasource is set
   * Improved some error logging which was hiding root cause stack traces

---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java
M src-core/src/org/openbravo/base/ConnectionProviderContextListener.java
M src-core/src/org/openbravo/base/HttpBaseServlet.java
M src-core/src/org/openbravo/database/ConnectionProviderImpl.java
M src-core/src/org/openbravo/database/JNDIConnectionProvider.java
M src/org/openbravo/base/model/ModelProvider.java
M src/org/openbravo/base/session/SessionFactoryController.java
---
(0081309)
hgbot (developer)
2015-10-26 11:57

Repository: erp/devel/pi
Changeset: ed046574e6ff71eb503d8309e810b283c8d48242
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Oct 26 11:56:37 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ed046574e6ff71eb503d8309e810b283c8d48242 [^]

related to issue 30919: fixed logic to check if JNDIConnectionProvider is used

  Old JNDIConnectionProvider should be used if JNDI is configured and there is
  no external pool in use.

---
M src-core/src/org/openbravo/base/ConnectionProviderContextListener.java
---
(0081332)
AugustoMauch (manager)
2015-10-27 09:45

Code reviewed and verified in pi@3a698bde90ad
(0082140)
hudsonbot (developer)
2015-11-23 21: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/7b56bebaaa88 [^]
Maturity status: Test
(0082158)
hudsonbot (developer)
2015-11-23 21: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/7b56bebaaa88 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-09-24 12:22 alostale New Issue
2015-09-24 12:22 alostale Assigned To => platform
2015-09-24 12:22 alostale Modules => Core
2015-09-24 12:22 alostale Triggers an Emergency Pack => No
2015-09-24 12:26 alostale Regression level => Production - Confirmed Stable
2015-09-24 12:26 alostale Regression date => 2011-01-19
2015-09-24 12:26 alostale Regression introduced in release => 3.0RC4
2015-09-24 12:26 alostale Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/7fc34fd92373 [^]
2015-09-24 12:28 alostale Relationship added related to 0030918
2015-09-24 12:35 alostale Description Updated View Revisions
2015-09-24 12:36 alostale Steps to Reproduce Updated View Revisions
2015-09-24 12:38 alostale Description Updated View Revisions
2015-09-24 12:38 alostale Steps to Reproduce Updated View Revisions
2015-09-24 12:39 alostale Status new => scheduled
2015-09-24 12:39 alostale Assigned To platform => alostale
2015-09-24 12:40 alostale Relationship added related to 0029564
2015-09-24 12:54 alostale Target Version => 3.0PR15Q4
2015-09-28 18:37 rafademiguel Issue Monitored: rafademiguel
2015-09-29 12:29 alostale Target Version 3.0PR15Q4 => 3.0PR16Q1
2015-10-22 07:39 hgbot Checkin
2015-10-22 07:39 hgbot Note Added: 0081182
2015-10-22 07:39 hgbot Status scheduled => resolved
2015-10-22 07:39 hgbot Resolution open => fixed
2015-10-22 07:39 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7f26d269ea390bc6eb51b9200da4cc4f2c020984 [^]
2015-10-22 07:40 alostale Review Assigned To => AugustoMauch
2015-10-26 11:57 hgbot Checkin
2015-10-26 11:57 hgbot Note Added: 0081309
2015-10-27 09:45 AugustoMauch Note Added: 0081332
2015-10-27 09:45 AugustoMauch Status resolved => closed
2015-10-27 09:45 AugustoMauch Fixed in Version => 3.0PR16Q1
2015-11-23 21:16 hudsonbot Checkin
2015-11-23 21:16 hudsonbot Note Added: 0082140
2015-11-23 21:16 hudsonbot Checkin
2015-11-23 21:16 hudsonbot Note Added: 0082158


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker