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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036352
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2017-06-27 08:342022-02-01 08:05
ReportercaristuView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036352: Still there are requests for standard 2.50 buttons that borrow 2 connections

DescriptionWhen a 2.50 style process is opened some requests are performed each of them borrowing 2 connections due to XmlEngine translation (see 0036293).

This issue is a continuation of issue 0036299
Steps To Reproduce1. Install DB Pool log module [1]
2. Configure Openbravo.properties to log threads borrowing more than one connection:
     db.pool.logger.enabled=true
     db.pool.logger.logMultipleConnectionsPerThread=true
3. Select a Sales Order
4. Click on Book button
  -> check log (among others):

595dbc4c 59307 [http-bio-8080-exec-7] WARN org.openbravo.util.db.DBPoolLogger - ** Listing other 1 active connections for this thread in addition to new PooledConnection[org.postgresql.jdbc.PgConnection@32b7429f] **
595dbc4c 59307 [http-bio-8080-exec-7] WARN org.openbravo.util.db.DBPoolLogger - ===================== ACTIVE - 2017-06-26 19:38:18.195 - 1498498698195 - PooledConnection[org.postgresql.jdbc.PgConnection@4cc72345]
  Thread: http-bio-8080-exec-7
   org.openbravo.database.ConnectionProviderImpl.getNewConnection(ConnectionProviderImpl.java:260)
   org.openbravo.database.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:236)
   org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:369)
   org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:361)
   org.openbravo.base.HttpBaseServlet.getPreparedStatement(HttpBaseServlet.java:386)
   org.openbravo.base.secureApp.ClassInfoData.select(ClassInfoData.java:82)
   org.openbravo.base.secureApp.ClassInfoData.select(ClassInfoData.java:45)
   org.openbravo.base.secureApp.HttpSecureAppServlet.init(HttpSecureAppServlet.java:132)


595dbc4c 59361 [http-bio-8080-exec-3] WARN org.openbravo.util.db.DBPoolLogger - ***** Trying to get a connection in a thread that already has an active connection.
  org.openbravo.database.ConnectionProviderImpl.getNewConnection(ConnectionProviderImpl.java:260)
  org.openbravo.database.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:236)
  org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:369)
  org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:361)
  org.openbravo.base.HttpBaseServlet.getPreparedStatement(HttpBaseServlet.java:386)
  org.openbravo.erpCommon.utility.WindowAccessData.hasReadOnlyAccess(WindowAccessData.java:91)
  org.openbravo.erpWindows.SalesOrder.Header.doPost(Header.java:144)
  org.openbravo.base.HttpBaseServlet.doGet(HttpBaseServlet.java:294)

595dbc4c 59362 [http-bio-8080-exec-3] WARN org.openbravo.util.db.DBPoolLogger - ** Listing other 1 active connections for this thread in addition to new PooledConnection[org.postgresql.jdbc.PgConnection@32b7429f] **
595dbc4c 59362 [http-bio-8080-exec-3] WARN org.openbravo.util.db.DBPoolLogger - ===================== ACTIVE - 2017-06-26 19:38:18.241 - 1498498698241 - PooledConnection[org.postgresql.jdbc.PgConnection@4cc72345]
  Thread: http-bio-8080-exec-3
   org.openbravo.dal.core.SessionHandler.getNewConnection(SessionHandler.java:300)
   org.openbravo.dal.core.SessionHandler.createSession(SessionHandler.java:235)
   org.openbravo.dal.core.SessionHandler.begin(SessionHandler.java:561)
   org.openbravo.dal.core.SessionHandler.getSession(SessionHandler.java:183)
   org.openbravo.dal.service.OBQuery.getSession(OBQuery.java:542)
   org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:242)
   org.openbravo.dal.service.OBQuery.list(OBQuery.java:120)
   org.openbravo.erpCommon.businessUtility.Preferences.getPreferences(Preferences.java:462)

---
[1] http://centralrepository.openbravo.com/openbravo/org.openbravo.forge.ui/sso/ForgeModuleDetail/DB-Pool-Logging-Utilities [^]
Proposed SolutionAttached patch with the proposed solution, it is pending to be reviewed because is not complete.

Currently it is not using the same transaction to create a pistance and the AD_PINSTANCE_PARA data. Thus, it causes the following error, for example when launching the "Create Periods" process:

ERROR org.openbravo.erpCommon.reference.PInstanceProcessData - SQL error in query: INSERT INTO AD_PINSTANCE_PARA (ad_pinstance_para_id, AD_PINSTANCE_ID, SEQNO, PARAMETERNAME, P_STRING, AD_CLIENT_ID, AD_ORG_ID, CREATED, CREATEDBY, UPDATED, UPDATEDBY) VALUES(get_uuid(), ?,TO_NUMBER(?),?,?, ?, ?, now(), ?, now(), ?)Exception:org.postgresql.util.PSQLException: ERROR: insert or update on table "ad_pinstance_para" violates foreign key constraint "ad_pinstance_para_ad_pinstance"
  Detail: Key (ad_pinstance_id)=(EDEDC0758C5E45B589DE0462A14BE17B) is not present in table "ad_pinstance".
TagsNo tags attached.
Attached Files? file icon 36299.export [^] (13,614 bytes) 2017-06-27 08:34

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0036299 closedalostale many requests for standard 2.50 buttons borrow 2 connections 
blocks defect 0035855 closedalostale many standard requests borrow more than one connection from DB 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-06-27 08:34 caristu New Issue
2017-06-27 08:34 caristu Assigned To => platform
2017-06-27 08:34 caristu Modules => Core
2017-06-27 08:34 caristu Triggers an Emergency Pack => No
2017-06-27 08:34 caristu File Added: 36299.export
2017-06-27 08:34 caristu Relationship added related to 0036299
2017-07-03 16:18 caristu Proposed Solution updated
2017-07-03 16:26 caristu Proposed Solution updated
2017-07-03 16:29 caristu Proposed Solution updated
2017-07-14 10:54 alostale Status new => acknowledged
2017-08-04 13:29 alostale Relationship added blocks 0035855
2022-02-01 08:05 alostale Assigned To platform => Triage Platform Base


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker