Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036309Retail ModulesWeb POSpublic2017-06-22 12:102017-07-31 13:01
shuehner 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
 
migueldejuana
No
0036309: 4 requests of POS MasterData loading read from session where sometimes none exists
TaxRate
TaxZone
ProductProperties
ProductPrice

Example stackTrace:
70a8a81e 2017-06-19 18:12:31,619 [ajp-bio-127.0.0.1-8009-exec-348] ERROR org.openbravo.mobile.core.process.ProcessHQLQuery - org.openbravo.retail.posterminal.master.TaxRate: Error when generating query: null (null)
java.lang.NullPointerException
        at org.openbravo.retail.posterminal.master.TaxRate.getParameterValues(TaxRate.java:39)
        at org.openbravo.mobile.core.process.ProcessHQLQuery.exec(ProcessHQLQuery.java:128)
        at org.openbravo.mobile.core.process.SecuredJSONProcess.secureExec(SecuredJSONProcess.java:56)
        at org.openbravo.mobile.core.process.MobileServiceProcessor.execProcess(MobileServiceProcessor.java:117)
        at org.openbravo.mobile.core.process.MobileServiceProcessor.execServiceName(MobileServiceProcessor.java:79)
        at org.openbravo.mobile.core.process.MobileService.doGetOrPost(MobileService.java:119)
        at org.openbravo.mobile.core.process.MobileService.doGet(MobileService.java:55)


looks like reading POSTerminal value from 'session'
-
Read value which should exist in json instead of from session
No tags attached.
Issue History
2017-06-22 12:10shuehnerNew Issue
2017-06-22 12:10shuehnerAssigned To => Retail
2017-06-22 12:10shuehnerResolution time => 1499896800
2017-06-22 12:10shuehnerTriggers an Emergency Pack => No
2017-06-22 12:30shuehnerNote Added: 0097583
2017-06-26 14:50ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-06-26 14:50ranjith_qualiantech_comStatusnew => scheduled
2017-07-05 07:45hgbotCheckin
2017-07-05 07:45hgbotNote Added: 0097857
2017-07-05 07:45hgbotStatusscheduled => resolved
2017-07-05 07:45hgbotResolutionopen => fixed
2017-07-05 07:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3fadc67acfb9652a88dea4fca69abd2e2fe0d89e [^]
2017-07-07 12:13marvintmNote Added: 0097941
2017-07-07 12:13marvintmStatusresolved => new
2017-07-07 12:13marvintmResolutionfixed => open
2017-07-07 12:16ranjith_qualiantech_comStatusnew => scheduled
2017-07-17 09:14hgbotCheckin
2017-07-17 09:14hgbotNote Added: 0098093
2017-07-18 07:45hgbotCheckin
2017-07-18 07:45hgbotNote Added: 0098110
2017-07-18 07:46hgbotCheckin
2017-07-18 07:46hgbotNote Added: 0098111
2017-07-18 07:46hgbotStatusscheduled => resolved
2017-07-18 07:46hgbotResolutionopen => fixed
2017-07-18 07:46hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3fadc67acfb9652a88dea4fca69abd2e2fe0d89e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/72483152042e021c6aeb3d260f910c327b518033 [^]
2017-07-19 07:36ranjith_qualiantech_comNote Added: 0098119
2017-07-19 07:36ranjith_qualiantech_comStatusresolved => new
2017-07-19 07:36ranjith_qualiantech_comResolutionfixed => open
2017-07-19 07:37hgbotCheckin
2017-07-19 07:37hgbotNote Added: 0098120
2017-07-19 07:37hgbotCheckin
2017-07-19 07:37hgbotNote Added: 0098121
2017-07-24 08:56ranjith_qualiantech_comStatusnew => scheduled
2017-07-25 07:53hgbotCheckin
2017-07-25 07:53hgbotNote Added: 0098206
2017-07-25 07:53hgbotCheckin
2017-07-25 07:53hgbotNote Added: 0098207
2017-07-25 07:53hgbotStatusscheduled => resolved
2017-07-25 07:53hgbotResolutionopen => fixed
2017-07-25 07:53hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/72483152042e021c6aeb3d260f910c327b518033 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2a02511b8c8c3da86dabb17acfdd0d6ee83f48aa [^]
2017-07-31 13:01migueldejuanaReview Assigned To => migueldejuana
2017-07-31 13:01migueldejuanaNote Added: 0098273
2017-07-31 13:01migueldejuanaStatusresolved => closed

Notes
(0097583)
shuehner   
2017-06-22 12:30   
Also seen in:
    132 ERROR org.openbravo.mobile.core.process.ProcessHQLQuery - org.openbravo.retail.posterminal.master.Product: Error when g
    133 ERROR org.openbravo.mobile.core.process.ProcessHQLQuery - org.openbravo.retail.posterminal.master.PriceList: Error when


Note best to grep for reading from session in all files.
(0097857)
hgbot   
2017-07-05 07:45   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3fadc67acfb9652a88dea4fca69abd2e2fe0d89e
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Jul 05 11:14:35 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3fadc67acfb9652a88dea4fca69abd2e2fe0d89e [^]

Fixed issue 36309 : Replaced session values with POS values from request in master data

---
M src/org/openbravo/retail/posterminal/master/Cashup.java
M src/org/openbravo/retail/posterminal/master/PriceList.java
M src/org/openbravo/retail/posterminal/master/ProductPrice.java
M src/org/openbravo/retail/posterminal/master/TaxRate.java
M src/org/openbravo/retail/posterminal/master/TaxZone.java
M src/org/openbravo/retail/posterminal/term/BusinessPartner.java
M src/org/openbravo/retail/posterminal/term/Currency.java
M src/org/openbravo/retail/posterminal/term/HardwareURL.java
M src/org/openbravo/retail/posterminal/term/Payments.java
M src/org/openbravo/retail/posterminal/term/PriceList.java
M src/org/openbravo/retail/posterminal/term/PriceListVersion.java
M src/org/openbravo/retail/posterminal/term/Terminal.java
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0097941)
marvintm   
2017-07-07 12:13   
The current changes are correct. However, I still see some places where we read the terminal from a session attribute, both in the Retail pack modules, and other external modules:

These are the ones which as far as I can see need to be changed:

modules/org.openbravo.mobile.core/src/org/openbravo/mobile/core/authenticate/GetToken.java: if (RequestContext.get().getSessionAttribute(
modules/org.openbravo.mobile.core/src/org/openbravo/mobile/core/authenticate/GetToken.java: .getSessionAttribute("POSTerminal"));
modules/org.openbravo.mobile.core/src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java: (String) RequestContext.get().getSessionAttribute("POSTerminal")));
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/login/LoginUtilsServlet.java: if (RequestContext.get().getSessionAttribute("MPRTerminalSk") == null) {
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/master/Product.java: String POSSearchKey = RequestContext.get().getSessionAttribute("MPRTerminalSk").toString();
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/master/ProductCategory.java: String POSSearchKey = RequestContext.get().getSessionAttribute("MPRTerminalSk").toString();
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/master/TaxRate.java: .getSessionAttribute("MPRTerminalSk").toString());
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/term/BusinessPartner.java: .getBusinessPartner(RequestContext.get().getSessionAttribute("MPRTerminalSk").toString());
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/term/Context.java: final String dbSessionId = (String) RequestContext.get().getSessionAttribute(
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/term/Currency.java: String MPRConfSK = RequestContext.get().getSessionAttribute("MPRTerminalSk").toString();
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/term/PriceList.java: RequestContext.get().getSessionAttribute("MPRTerminalSk").toString()).getId();
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/term/PriceListVersion.java: RequestContext.get().getSessionAttribute("MPRTerminalSk").toString()).getId();
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/term/Terminal.java: String MPRConfSK = RequestContext.get().getSessionAttribute("MPRTerminalSk").toString();
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/term/Terminal.java: .getSessionAttribute("MPRTerminalSk").toString());
modules/org.openbravo.mobile.procurement/src/org/openbravo/mobile/procurement/utils/MPRUtils.java: .getSessionAttribute("MPRTerminalSk").toString());
modules/org.openbravo.retail.bestsellers/src/org/openbravo/retail/bestsellers/BestSellersProperties.java: .getSessionAttribute("POSTerminal").toString());
modules/org.openbravo.retail.bestsellers/src/org/openbravo/retail/bestsellers/BrandBestSellerHQLCriteria.java: .getSessionAttribute("POSTerminal").toString());
modules/org.openbravo.retail.bestsellers/src/org/openbravo/retail/bestsellers/PCharacteristicBestSellerHQLCriteria.java: .getSessionAttribute("POSTerminal").toString());
modules/org.openbravo.retail.bestsellers/src/org/openbravo/retail/bestsellers/PCharacteristicValueBestSellerHQLCriteria.java: .getSessionAttribute("POSTerminal").toString());
modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/LoginUtilsServlet.java: if (RequestContext.get().getSessionAttribute("POSTerminal") == null) {
modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/master/Cashup.java.orig: String posId = RequestContext.get().getSessionAttribute("POSTerminal").toString();
modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/master/Cashup.java.orig: String posId = RequestContext.get().getSessionAttribute("POSTerminal").toString();
modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/master/ProductProperties.java: posDetail = POSUtils.getTerminalById(RequestContext.get().getSessionAttribute("POSTerminal")
modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/term/Terminal.java: String posId = RequestContext.get().getSessionAttribute("POSTerminal").toString();
(0098093)
hgbot   
2017-07-17 09:14   
Repository: erp/pmods/org.openbravo.mobile.procurement
Changeset: 73e3c850a217044631128ca5f72ed7c084fbe66c
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jul 17 12:44:03 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.procurement/rev/73e3c850a217044631128ca5f72ed7c084fbe66c [^]

Related to issue 36309 : Replaced session values with Terminal values from request in master data

---
M src/org/openbravo/mobile/procurement/login/LoginUtilsServlet.java
M src/org/openbravo/mobile/procurement/master/Product.java
M src/org/openbravo/mobile/procurement/master/ProductCategory.java
M src/org/openbravo/mobile/procurement/master/TaxRate.java
M src/org/openbravo/mobile/procurement/term/BusinessPartner.java
M src/org/openbravo/mobile/procurement/term/Currency.java
M src/org/openbravo/mobile/procurement/term/PriceList.java
M src/org/openbravo/mobile/procurement/term/PriceListVersion.java
M src/org/openbravo/mobile/procurement/term/Terminal.java
M src/org/openbravo/mobile/procurement/term/Warehouses.java
M src/org/openbravo/mobile/procurement/utils/MPRUtils.java
M web/org.openbravo.mobile.procurement/source/terminal/mpr-terminal.js
---
(0098110)
hgbot   
2017-07-18 07:45   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 75790841a4ee50716ba350260dfe3537435768b9
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 18 11:14:57 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/75790841a4ee50716ba350260dfe3537435768b9 [^]

Related to issue 36309 : Replaced session values with Terminal values from request in master data

---
M src/org/openbravo/mobile/core/authenticate/GetToken.java
---
(0098111)
hgbot   
2017-07-18 07:46   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 72483152042e021c6aeb3d260f910c327b518033
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 18 11:15:18 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/72483152042e021c6aeb3d260f910c327b518033 [^]

Fixed issue 36309 : Replaced session values with Terminal values from request in master data

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
M src/org/openbravo/retail/posterminal/master/LoadedProduct.java
M src/org/openbravo/retail/posterminal/master/Product.java
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
M src/org/openbravo/retail/posterminal/term/Terminal.java
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0098119)
ranjith_qualiantech_com   
2017-07-19 07:36   
Due to changeset, test failed in modules suite
(0098120)
hgbot   
2017-07-19 07:37   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: dbe38588e3743fdc370dd1d1f3bb674da024d321
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Jul 19 11:05:05 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/dbe38588e3743fdc370dd1d1f3bb674da024d321 [^]

Related to issue 36309 : Backed out changeset: 75790841a4ee

Backout changeset due to test failed in modules suite

---
M src/org/openbravo/mobile/core/authenticate/GetToken.java
---
(0098121)
hgbot   
2017-07-19 07:37   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: ab11a97dbdbcfaa524014c0b10fd98ab53287d20
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Jul 19 11:05:31 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ab11a97dbdbcfaa524014c0b10fd98ab53287d20 [^]

Related to issue 36309 : Backed out changeset: 72483152042e

Backout changeset due to test failed in modules suite

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
M src/org/openbravo/retail/posterminal/master/LoadedProduct.java
M src/org/openbravo/retail/posterminal/master/Product.java
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
M src/org/openbravo/retail/posterminal/term/Terminal.java
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0098206)
hgbot   
2017-07-25 07:53   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 5b1201348091aff5062bae0cf33bc084520ea745
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 25 11:22:45 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5b1201348091aff5062bae0cf33bc084520ea745 [^]

Related to issue 36309 : Replaced session values with Terminal values from request in master data

---
M src/org/openbravo/mobile/core/authenticate/GetToken.java
---
(0098207)
hgbot   
2017-07-25 07:53   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2a02511b8c8c3da86dabb17acfdd0d6ee83f48aa
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 25 11:22:54 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2a02511b8c8c3da86dabb17acfdd0d6ee83f48aa [^]

Fixed issue 36309 : Replaced session values with Terminal values from request in master data

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
M src/org/openbravo/retail/posterminal/master/LoadedProduct.java
M src/org/openbravo/retail/posterminal/master/Product.java
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
M src/org/openbravo/retail/posterminal/term/Terminal.java
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0098273)
migueldejuana   
2017-07-31 13:01   
Reviewed