Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033696Retail ModulesWeb POSpublic2016-08-12 09:552016-08-18 10:06
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
RR16Q4 
migueldejuana
No
0033696: NPE in POSImportEntryProcessor when the posterminal json property has an illegal value
See stacktrace [1], this causes the import entry from not being saved at all. Change the code [2] to set the status to error and a warning messages.

[1]
Caused by: org.openbravo.base.exception.OBException: java.lang.NullPointerException
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.createImportEntry(DataSynchronizationProcess.java:89)
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.executeCreateImportEntry(DataSynchronizationProcess.java:115)
        ... 41 more
Caused by: java.lang.NullPointerException
        at org.openbravo.retail.posterminal.importprocess.POSImportEntryProcessor.onSave(POSImportEntryProcessor.java:79)
        at sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/060b566c4098/src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java [^]
Run retail
Put breakpoint in java code in POSImportEntryProcessor
Login to webpos
Do some actions
At breakpoint change the json to set the posTerminalId to the value "null" (note use the string value "null" so not NULL or null)
log warning
set status to Error if no posterminal can be found
No tags attached.
related to defect 0033695 closed migueldejuana It is still possible to press twice Done or Layaway buttons 
depends on backport 0033701RR16Q3.1 closed mtaal NPE in POSImportEntryProcessor when the posterminal json property has an illegal value 
depends on backport 0033702RR16Q2.2 closed mtaal NPE in POSImportEntryProcessor when the posterminal json property has an illegal value 
diff 33696-16Q1.diff (5,126) 2016-08-15 19:48
https://issues.openbravo.com/file_download.php?file_id=9717&type=bug
Issue History
2016-08-12 09:55mtaalNew Issue
2016-08-12 09:55mtaalAssigned To => mtaal
2016-08-12 09:55mtaalTriggers an Emergency Pack => No
2016-08-12 09:55mtaalReview Assigned To => migueldejuana
2016-08-12 09:55mtaalDescription Updatedbug_revision_view_page.php?rev_id=12824#r12824
2016-08-12 12:38hgbotCheckin
2016-08-12 12:38hgbotNote Added: 0089085
2016-08-12 12:38hgbotStatusnew => resolved
2016-08-12 12:38hgbotResolutionopen => fixed
2016-08-12 12:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/77435e4a7b40ba41925cf9d53712db38b242675c [^]
2016-08-12 12:45OrekariaStatusresolved => new
2016-08-12 12:45OrekariaResolutionfixed => open
2016-08-12 12:46OrekariaStatusnew => scheduled
2016-08-12 12:46OrekariaStatusscheduled => resolved
2016-08-12 12:46OrekariaResolutionopen => fixed
2016-08-12 14:35migueldejuanaRelationship addedrelated to 0033695
2016-08-15 19:48mtaalFile Added: 33696-16Q1.diff
2016-08-18 10:06migueldejuanaNote Added: 0089203
2016-08-18 10:06migueldejuanaStatusresolved => closed

Notes
(0089085)
hgbot   
2016-08-12 12:38   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 77435e4a7b40ba41925cf9d53712db38b242675c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Aug 12 12:37:48 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/77435e4a7b40ba41925cf9d53712db38b242675c [^]

Fixes issue 33696: NPE in POSImportEntryProcessor when the posterminal json property has an illegal value
Moved code to static final members, handle incorrect "null" value from posterminal in a better way

Note: changeset looks bigger than actual changes because of changed indenting of code

---
M src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java
---
(0089203)
migueldejuana   
2016-08-18 10:06   
Tested and verified