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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039446
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSmajoralways2018-04-13 10:152018-10-18 17:16
ReporteregoitzView Statuspublic 
Assigned Tomarvintm 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisiona1d001aae7c6
ProjectionnoneETAnoneTarget VersionRR18Q3.2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomigueldejuana
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039446: The terminal does not go to offline mode if the database is colapsed but the tomcat works

DescriptionIf for example, the database get out of connections, the webpos does not go offline.
Steps To Reproduce-Access to a terminal
-Stop postgresql.
-Refresh the application.
*It tryies to login but then you are continuosly requested to login again.
OFFLINE does not work
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks design defect 0038361 closedmarvintm The terminal does not go to offline mode if the database is colapsed but the tomcat works 

-  Notes
(0107385)
hgbot (developer)
2018-10-18 09:44

Repository: erp/backports/3.0PR18Q3.2
Changeset: 98d6ff8f62af4f22de25bfe75942015e975c5de2
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:39:16 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/98d6ff8f62af4f22de25bfe75942015e975c5de2 [^]

Related to issue 39446. Backport hasNoConnections method.

---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java
M src-core/src/org/openbravo/database/ExternalConnectionPool.java
---
(0107386)
hgbot (developer)
2018-10-18 09:44

Repository: erp/backports/3.0PR18Q3.2
Changeset: 319737990b14756658cb513bbcf5fd7b0a3cef05
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:43:32 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/319737990b14756658cb513bbcf5fd7b0a3cef05 [^]

Fixed issue 39446 The terminal does not go to offline mode if the database is colapsed but the tomcat works
> When there is an exception in the critical part of the HttpSecureAppServlet which tries to detect if the client is authenticated, we should not necessarily force a logout and reply with '401- Not authenticated' response. Instead, the appropriate action is to just return a '500-Internal Server Error' response. Logging out in this case may kill a valid request when the server is temporarily overloaded, and makes no sense, and the 401 response may confuse the client, thinking that it needs to do login again when in reality, the problem is just that the server is either overloaded, or affected by some serious problem which prevents even basic authentication checking to work.

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
(0107387)
hgbot (developer)
2018-10-18 09:44

Repository: erp/backports/3.0PR18Q3.2
Changeset: c6dc68fccff2cde583a7cf5aeeb3d5a543b06a5e
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:43:51 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/c6dc68fccff2cde583a7cf5aeeb3d5a543b06a5e [^]

Related to issue 39446. Improved comment and log.

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
(0107389)
hgbot (developer)
2018-10-18 09:48

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.retail.posterminal
Changeset: 3ade0146c01d79bd066fec63b9952721f1787de3
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:48:45 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.retail.posterminal/rev/3ade0146c01d79bd066fec63b9952721f1787de3 [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Two changes have been made:
- In the main Terminal request, if the response is not a known message, then most probably it is a critical error which happened in the server when trying to compute the terminal. In this case, it is better to try to force an offline login than block the process, as this may otherwise make it impossible to do an offline login in the system when the server is affected by some serious problem.
- In the loginUtils request, if the request fails with an unexpected error, we will try to continue with the main flow to allow an offline login to be completed.

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0107399)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: fb6472ec07910d2a89b9b80604073dbf10ac23d4
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:25:04 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/fb6472ec07910d2a89b9b80604073dbf10ac23d4 [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Added some basic check with a database query. Modified the response to ensure that it follows a correct format.

---
M src/org/openbravo/mobile/core/login/CheckServerAvailability.java
---
(0107400)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: d400265ea59541c1221eee8dd26f4fdd599ee7f1
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:27:03 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/d400265ea59541c1221eee8dd26f4fdd599ee7f1 [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
If server ran out of connections, we will generate an '500-Internal Server Error'. Otherwise, if it's just a normal Exception, we assume that it is a plain defect in functional code which should not be considered cause of a general server problem, and will return a standard error with a 200 response.

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
---
(0107401)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: 0ef8e020aa1643551e1293eae7eb2ebde2a887a4
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:28:07 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/0ef8e020aa1643551e1293eae7eb2ebde2a887a4 [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Do not catch Throwables, we just let them leak to super classes, in which they will be handled correctly (will still return '500 Internal Server error' in this case)

---
M src/org/openbravo/mobile/core/process/MobileService.java
---
(0107402)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: 14c39c1a6d47f78b3d9786eea6683fb0d823aedc
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:28:46 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/14c39c1a6d47f78b3d9786eea6683fb0d823aedc [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Do not catch Throwables, we just let them leak to super classes, in which they will be handled correctly (will still return '500 Internal Server error' in this case).

---
M src/org/openbravo/mobile/core/process/WebServiceAbstractServlet.java
---
(0107403)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: e921d8a23d252aa2be9ba1605d738457ce32e70e
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:30:22 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/e921d8a23d252aa2be9ba1605d738457ce32e70e [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
> Avoid setting wrong (unauthorized) state, in case HttpSecureAppServlet was affected by an exception in a critical part, and returned a 500 state

---
M src/org/openbravo/mobile/core/process/WebServiceAuthenticatedServlet.java
---
(0107404)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: 233363fde0ce84d88a1492a712b7305497328d5b
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:31:33 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/233363fde0ce84d88a1492a712b7305497328d5b [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Ensure transitionToOnline counter correctly resets to the next step, in case of CheckServerAvailability error.

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0107405)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: a1d001aae7c6a3a7402544bf3403d2eb5fd74a21
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:32:22 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/a1d001aae7c6a3a7402544bf3403d2eb5fd74a21 [^]

Fixed issue 39446. The terminal does not go to offline mode if the database is colapsed but the tomcat works
When doing offline login ensure that when connectedToERP variable changes due to the load of the Terminal object from cache, this doesn't affect the rest of the login process.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0107406)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: 24fd6cbd278c11fe2893c1ab3c7656a78a629201
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Sat Oct 13 19:02:46 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/24fd6cbd278c11fe2893c1ab3c7656a78a629201 [^]

Related to issue 39446. Applied formatter.

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0107407)
hgbot (developer)
2018-10-18 10:21

Repository: retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core
Changeset: 047c94c8895d4b7a2f7dece668762014b2184536
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Oct 16 14:15:30 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/047c94c8895d4b7a2f7dece668762014b2184536 [^]

Related to issue 39446. Language will not be reset if response is invalid.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0107410)
hgbot (developer)
2018-10-18 10:31

Repository: erp/backports/3.0PR18Q3.2
Changeset: 7dc62a036b50af1540fd87bbbb439593eb62c8f6
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 10:30:27 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/7dc62a036b50af1540fd87bbbb439593eb62c8f6 [^]

Related to issue 39446. Backout hasNoConnections method implementation, will be replaced by a Java7 compliant version

---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java
M src-core/src/org/openbravo/database/ExternalConnectionPool.java
---
(0107411)
hgbot (developer)
2018-10-18 10:31

Repository: erp/backports/3.0PR18Q3.2
Changeset: 4312cc454a6cf3c2d5d674f88b770bec0fa67ae0
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 10:31:32 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/4312cc454a6cf3c2d5d674f88b770bec0fa67ae0 [^]

Related to issue 39446. Backport hasNoConnections method.

---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java
M src-core/src/org/openbravo/database/ExternalConnectionPool.java
---
(0107432)
hgbot (developer)
2018-10-18 12:33

Repository: erp/backports/3.0PR18Q3.2
Changeset: b51fb5e5838e211211aa1913e180f9af9ecd5f94
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 12:33:14 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/b51fb5e5838e211211aa1913e180f9af9ecd5f94 [^]

Related to issue 39446. Change to comply with Java7

---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java
---
(0107445)
migueldejuana (developer)
2018-10-18 17:16

Tested and reviewed

- Issue History
Date Modified Username Field Change
2018-10-15 10:36 marvintm Type design defect => backport
2018-10-15 10:36 marvintm Target Version => RR18Q3.2
2018-10-16 17:08 martinsdan Issue Monitored: martinsdan
2018-10-18 09:44 hgbot Checkin
2018-10-18 09:44 hgbot Note Added: 0107385
2018-10-18 09:44 hgbot Checkin
2018-10-18 09:44 hgbot Note Added: 0107386
2018-10-18 09:44 hgbot Status scheduled => resolved
2018-10-18 09:44 hgbot Resolution open => fixed
2018-10-18 09:44 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/319737990b14756658cb513bbcf5fd7b0a3cef05 [^]
2018-10-18 09:44 hgbot Checkin
2018-10-18 09:44 hgbot Note Added: 0107387
2018-10-18 09:48 hgbot Checkin
2018-10-18 09:48 hgbot Note Added: 0107389
2018-10-18 09:48 hgbot Fixed in SCM revision http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/319737990b14756658cb513bbcf5fd7b0a3cef05 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.retail.posterminal/rev/3ade0146c01d79bd066fec63b9952721f1787de3 [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107399
2018-10-18 10:21 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.retail.posterminal/rev/3ade0146c01d79bd066fec63b9952721f1787de3 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/fb6472ec07910d2a89b9b80604073dbf10ac23d4 [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107400
2018-10-18 10:21 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/fb6472ec07910d2a89b9b80604073dbf10ac23d4 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/d400265ea59541c1221eee8dd26f4fdd599ee7f1 [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107401
2018-10-18 10:21 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/d400265ea59541c1221eee8dd26f4fdd599ee7f1 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/0ef8e020aa1643551e1293eae7eb2ebde2a887a4 [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107402
2018-10-18 10:21 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/0ef8e020aa1643551e1293eae7eb2ebde2a887a4 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/14c39c1a6d47f78b3d9786eea6683fb0d823aedc [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107403
2018-10-18 10:21 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/14c39c1a6d47f78b3d9786eea6683fb0d823aedc [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/e921d8a23d252aa2be9ba1605d738457ce32e70e [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107404
2018-10-18 10:21 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/e921d8a23d252aa2be9ba1605d738457ce32e70e [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/233363fde0ce84d88a1492a712b7305497328d5b [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107405
2018-10-18 10:21 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/233363fde0ce84d88a1492a712b7305497328d5b [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.2/org.openbravo.mobile.core/rev/a1d001aae7c6a3a7402544bf3403d2eb5fd74a21 [^]
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107406
2018-10-18 10:21 hgbot Checkin
2018-10-18 10:21 hgbot Note Added: 0107407
2018-10-18 10:31 hgbot Checkin
2018-10-18 10:31 hgbot Note Added: 0107410
2018-10-18 10:31 hgbot Checkin
2018-10-18 10:31 hgbot Note Added: 0107411
2018-10-18 12:33 hgbot Checkin
2018-10-18 12:33 hgbot Note Added: 0107432
2018-10-18 17:16 migueldejuana Review Assigned To => migueldejuana
2018-10-18 17:16 migueldejuana Note Added: 0107445
2018-10-18 17:16 migueldejuana Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker