Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0028934 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Modules] Apache External Connection Pool | major | always | 2015-02-13 10:34 | 2015-05-07 22:17 | |||
Reporter | daniOpenbravo | View Status | public | |||||
Assigned To | inigosanchez | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | b134bab019fe | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 64 bit | Database | Oracle | Java version | 1.6 | |||
OS Version | 14.04 | Database version | 2.1.1.64 | Ant version | 1.7 | |||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Regression date | ||||||||
Regression introduced by commit | ||||||||
Regression level | ||||||||
Review Assigned To | umartirena | |||||||
Support ticket | ||||||||
OBNetwork customer | No | |||||||
Regression introduced in release | ||||||||
Summary | 0028934: Error when launching "Create AP Expense Invoices" related to Openbravo External Connection Pools module. | |||||||
Description | If we try to launch "Create AP Expense Invoices" process while we have "Openbravo External Connection Pools" module installed and configured, we get the error shown on the attached image and Openbravo log. | |||||||
Steps To Reproduce | - Install "Openbravo External Connection Pools" module and configure it: http://wiki.openbravo.com/wiki/Modules:Apache_JDBC_Connection_Pool. [^] - Once this module is installed, we should add the following line to Openbravo.properties in order to Openbravo will start using JDBC Connection Pool (it is explained on the above link): db.externalPoolClassName=org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool - Launch "Create AP Expense Invoices": Select "From Date", "To Date" and "Date Invoiced" fields and click on "Process" button. - As we can see, the error on the attached screenshoot is raised. | |||||||
Proposed Solution | While debugging the code we have taken into account that if we comment the following line of ExpenseAPInvoice.java file, we do not get the error: releaseCommitConnection(conn); | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|||||||||||||||||||||||||
|
![]() |
|
(0074445) daniOpenbravo (viewer) 2015-02-13 11:01 edited on: 2015-02-13 11:15 |
We have edited "removeAbandoned" property (setting it as removeAbandoned=false) in connectionPool.properties configuration file but in this case it does not seem to be the problem. |
(0076821) hgbot (developer) 2015-04-28 12:06 |
Repository: erp/devel/pi Changeset: b134bab019fe3e3a354b5b53b0b887d4d4aefb39 Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com> Date: Tue Apr 28 11:49:51 2015 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/b134bab019fe3e3a354b5b53b0b887d4d4aefb39 [^] Fixes bug 28934:Error when launching "Create AP Expense Invoices". The problem wasn't related with "Openbravo External Connection Pools module". This issue has been reproduced without using "Apache JDBC Connection Pool", this is the error log: Apr 27, 2015 12:51:47 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet P801268 threw exception org.hibernate.TransactionException: JDBC commit failed at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:157) at org.openbravo.dal.core.SessionHandler.commitAndClose(SessionHandler.java:258) ......................... at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:701) Caused by: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled. at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:705) at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:166) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:142) In both cases (default connection pool or apache jdbc connection pool) there was an error related with the way of manage connections in "Create AP Expense Invoices" process. This connection is obtained with getConnection() method and finally it is closed in realeaseCommitConnection() method. This method gets the connection from the session. In following uses of "getConnection()" there is an error because this process closed the connection of the session. To fix this, using "getTransactionConnection()" instead of "getConnection()" method. This method creates a new connection instead of using the connection of the session. For this reason, it can be closed without any problem. --- M src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java --- |
(0076928) umartirena (viewer) 2015-05-04 10:57 |
Code Review + Testing OK |
(0077172) hudsonbot (viewer) 2015-05-07 22:17 |
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 |
![]() |
|||
Date Modified | Username | Field | Change |
2015-02-13 10:34 | daniOpenbravo | New Issue | |
2015-02-13 10:34 | daniOpenbravo | Assigned To | => AugustoMauch |
2015-02-13 10:34 | daniOpenbravo | File Added: bugJdbcExternalConnectionPool.txt | |
2015-02-13 11:01 | daniOpenbravo | Note Added: 0074445 | |
2015-02-13 11:01 | daniOpenbravo | Issue Monitored: daniOpenbravo | |
2015-02-13 11:11 | AugustoMauch | Note Edited: 0074445 | View Revisions |
2015-02-13 11:15 | daniOpenbravo | Note Edited: 0074445 | View Revisions |
2015-04-21 09:34 | inigosanchez | Assigned To | AugustoMauch => inigosanchez |
2015-04-28 12:03 | inigosanchez | Review Assigned To | => umartirena |
2015-04-28 12:03 | inigosanchez | OBNetwork customer | => No |
2015-04-28 12:06 | hgbot | Checkin | |
2015-04-28 12:06 | hgbot | Note Added: 0076821 | |
2015-04-28 12:06 | hgbot | Status | new => resolved |
2015-04-28 12:06 | hgbot | Resolution | open => fixed |
2015-04-28 12:06 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/b134bab019fe3e3a354b5b53b0b887d4d4aefb39 [^] |
2015-05-04 10:57 | umartirena | Note Added: 0076928 | |
2015-05-04 10:57 | umartirena | Status | resolved => closed |
2015-05-07 22:17 | hudsonbot | Checkin | |
2015-05-07 22:17 | hudsonbot | Note Added: 0077172 | |
2015-07-03 14:13 | ngarcia | Relationship added | causes 0030314 |
2015-09-14 15:59 | vmromanos | Relationship added | causes 0030811 |
2017-09-26 10:33 | aferraz | Relationship added | related to 0036945 |
Copyright © 2000 - 2009 MantisBT Group |