Openbravo Issue Tracking System - Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0028934 | Modules | Apache External Connection Pool | public | 2015-02-13 10:34 | 2015-05-07 22:17 |
|
Reporter | daniOpenbravo | |
Assigned To | inigosanchez | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 30 | OS Version | 14.04 |
Product Version | | |
Target Version | | Fixed in Version | | |
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); |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0036945 | | closed | AtulOpenbravo | Modules | Cannot post a document from the Report Not Posted window if an External Connection Pool is not used | causes | defect | 0030314 | | closed | Triage Omni OMS | Openbravo ERP | NullPointerException when launching the Create AP Expense Invoices process | causes | defect | 0030811 | | closed | dmiguelez | Openbravo ERP | process: "Create expense AP Invoice" does not work |
|
Attached Files | bugJdbcExternalConnectionPool.txt (7,911) 2015-02-13 10:34 https://issues.openbravo.com/file_download.php?file_id=7788&type=bug |
|
Issue History |
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 | bug_revision_view_page.php?bugnote_id=0074445#r7675 |
2015-02-13 11:15 | daniOpenbravo | Note Edited: 0074445 | bug_revision_view_page.php?bugnote_id=0074445#r7676 |
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 |
Notes |
|
(0074445)
|
daniOpenbravo
|
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
|
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
|
2015-05-04 10:57
|
|
|
|
|
|