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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039451
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 revisiondb5f7463a757
ProjectionnoneETAnoneTarget VersionRR18Q2.4
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

0039451: 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
(0107382)
hgbot (developer)
2018-10-18 09:42

Repository: erp/backports/3.0PR18Q2.3
Changeset: 1ab9d0c20167afa7830db5de162e507ccf968c8c
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:38:45 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/1ab9d0c20167afa7830db5de162e507ccf968c8c [^]

Related to issue 39451. Backport hasNoConnections method.

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

Repository: erp/backports/3.0PR18Q2.3
Changeset: 246fcd88bb39c4dd81a770ba29c254dc9ede25e0
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:41:55 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/246fcd88bb39c4dd81a770ba29c254dc9ede25e0 [^]

Fixed issue 39451. 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
---
(0107384)
hgbot (developer)
2018-10-18 09:43

Repository: erp/backports/3.0PR18Q2.3
Changeset: 204b57dc92f8f37d632b320382fc7667ee482c78
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:42:36 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/204b57dc92f8f37d632b320382fc7667ee482c78 [^]

Related to issue 39451. Improved comment and log.

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

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.retail.posterminal
Changeset: 21d5d99e5fbcccf3675c14b0bce8f2f8fe1fb115
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 09:48:15 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.retail.posterminal/rev/21d5d99e5fbcccf3675c14b0bce8f2f8fe1fb115 [^]

Fixed issue 39451. 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
---
(0107390)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: 79702b137ed23f2bf9e540d8695d2aabba106cd0
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.0RR18Q2.4/org.openbravo.mobile.core/rev/79702b137ed23f2bf9e540d8695d2aabba106cd0 [^]

Fixed issue 39451. 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
---
(0107391)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: eb5c4cc58800e32237eb5c84abec6bbf86cfedd5
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.0RR18Q2.4/org.openbravo.mobile.core/rev/eb5c4cc58800e32237eb5c84abec6bbf86cfedd5 [^]

Fixed issue 39451. 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
---
(0107392)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: ffc6e764e0ccb6061e9a55c4e6f4c6ce4afd330a
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.0RR18Q2.4/org.openbravo.mobile.core/rev/ffc6e764e0ccb6061e9a55c4e6f4c6ce4afd330a [^]

Fixed issue 39451. 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
---
(0107393)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: 4f19e7222b1e6f5e056a872c6e7897a7937846a1
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.0RR18Q2.4/org.openbravo.mobile.core/rev/4f19e7222b1e6f5e056a872c6e7897a7937846a1 [^]

Fixed issue 39451. 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
---
(0107394)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: dcdfdc18a66dcd88a2f7a7dee471de481d5e7440
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.0RR18Q2.4/org.openbravo.mobile.core/rev/dcdfdc18a66dcd88a2f7a7dee471de481d5e7440 [^]

Fixed issue 39451. 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
---
(0107395)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: e2b7f541e06f06164eefb17b590ae0286a7d3b7e
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.0RR18Q2.4/org.openbravo.mobile.core/rev/e2b7f541e06f06164eefb17b590ae0286a7d3b7e [^]

Fixed issue 39451. 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
---
(0107396)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: db5f7463a75734c9e7366a0be7c5a9e519064751
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.0RR18Q2.4/org.openbravo.mobile.core/rev/db5f7463a75734c9e7366a0be7c5a9e519064751 [^]

Fixed issue 39451. 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
---
(0107397)
hgbot (developer)
2018-10-18 10:18

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: cec0400b14bb12591036fe8660a56ac1755b3533
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.0RR18Q2.4/org.openbravo.mobile.core/rev/cec0400b14bb12591036fe8660a56ac1755b3533 [^]

Related to issue 39451. Applied formatter.

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

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core
Changeset: 53716df9f399768681582889d245b72adfd5ddf6
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.0RR18Q2.4/org.openbravo.mobile.core/rev/53716df9f399768681582889d245b72adfd5ddf6 [^]

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

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

Repository: erp/backports/3.0PR18Q2.3
Changeset: bb5bb2c5a986efde037943e1ae7ca485a08ca9ba
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 10:25:39 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/bb5bb2c5a986efde037943e1ae7ca485a08ca9ba [^]

Related to issue 39451. 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
---
(0107409)
hgbot (developer)
2018-10-18 10:29

Repository: erp/backports/3.0PR18Q2.3
Changeset: e828f42d336fafb5c613783444d2cf10d72f9695
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 10:29:10 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/e828f42d336fafb5c613783444d2cf10d72f9695 [^]

Related to issue 39451. Backport hasNoConnections method.

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

Repository: erp/backports/3.0PR18Q2.3
Changeset: 3bcc7cfdacb06ef1cd58f8e8e09dda6632d71935
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 18 12:32:31 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/3bcc7cfdacb06ef1cd58f8e8e09dda6632d71935 [^]

Related to issue 39451. Change to comply with Java7

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

Tested and reviewed

- Issue History
Date Modified Username Field Change
2018-10-15 15:22 marvintm Type design defect => backport
2018-10-15 15:22 marvintm Target Version => RR18Q2.4
2018-10-18 09:42 hgbot Checkin
2018-10-18 09:42 hgbot Note Added: 0107382
2018-10-18 09:42 hgbot Checkin
2018-10-18 09:42 hgbot Note Added: 0107383
2018-10-18 09:43 hgbot Status scheduled => resolved
2018-10-18 09:43 hgbot Resolution open => fixed
2018-10-18 09:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a16a113b5f65ce8cc671f1bead1a54a8b569bc52 [^] => http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/246fcd88bb39c4dd81a770ba29c254dc9ede25e0 [^]
2018-10-18 09:43 hgbot Checkin
2018-10-18 09:43 hgbot Note Added: 0107384
2018-10-18 09:48 hgbot Checkin
2018-10-18 09:48 hgbot Note Added: 0107388
2018-10-18 09:48 hgbot Fixed in SCM revision http://code.openbravo.com/erp/backports/3.0PR18Q2.3/rev/246fcd88bb39c4dd81a770ba29c254dc9ede25e0 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.retail.posterminal/rev/21d5d99e5fbcccf3675c14b0bce8f2f8fe1fb115 [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107390
2018-10-18 10:18 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.retail.posterminal/rev/21d5d99e5fbcccf3675c14b0bce8f2f8fe1fb115 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/79702b137ed23f2bf9e540d8695d2aabba106cd0 [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107391
2018-10-18 10:18 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/79702b137ed23f2bf9e540d8695d2aabba106cd0 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/eb5c4cc58800e32237eb5c84abec6bbf86cfedd5 [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107392
2018-10-18 10:18 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/eb5c4cc58800e32237eb5c84abec6bbf86cfedd5 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/ffc6e764e0ccb6061e9a55c4e6f4c6ce4afd330a [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107393
2018-10-18 10:18 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/ffc6e764e0ccb6061e9a55c4e6f4c6ce4afd330a [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/4f19e7222b1e6f5e056a872c6e7897a7937846a1 [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107394
2018-10-18 10:18 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/4f19e7222b1e6f5e056a872c6e7897a7937846a1 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/dcdfdc18a66dcd88a2f7a7dee471de481d5e7440 [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107395
2018-10-18 10:18 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/dcdfdc18a66dcd88a2f7a7dee471de481d5e7440 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/e2b7f541e06f06164eefb17b590ae0286a7d3b7e [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107396
2018-10-18 10:18 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/e2b7f541e06f06164eefb17b590ae0286a7d3b7e [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/db5f7463a75734c9e7366a0be7c5a9e519064751 [^]
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107397
2018-10-18 10:18 hgbot Checkin
2018-10-18 10:18 hgbot Note Added: 0107398
2018-10-18 10:25 hgbot Checkin
2018-10-18 10:25 hgbot Note Added: 0107408
2018-10-18 10:29 hgbot Checkin
2018-10-18 10:29 hgbot Note Added: 0107409
2018-10-18 12:32 hgbot Checkin
2018-10-18 12:32 hgbot Note Added: 0107431
2018-10-18 17:16 migueldejuana Review Assigned To => migueldejuana
2018-10-18 17:16 migueldejuana Note Added: 0107446
2018-10-18 17:16 migueldejuana Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker