Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038496Retail ModulesWeb POSpublic2018-05-07 15:242018-10-08 20:58
AugustoMauch 
rqueralta 
normalmajorhave not tried
scheduledopen 
5
 
 
No
0038496: Exception in ProcessHQLQuery can result in error JSON response being not properly formatted
If there is an exception in the ProcessHQLQuery after this line [1] but before this line [2], the resulting error JSON response will not be properly formatted, because it will contain the start of the data json array declaration but will not contain the closing brace.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/process/ProcessHQLQuery.java#l277 [^]
[2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/process/ProcessHQLQuery.java#l318 [^]
Force any runtime exception between these two lines [1], [2]. Login in in the POS, and check that the exception is captured and that the resulting JSON response is not properly formatted. It will look like this:

{
    "response": {
        "data": ["status": -1, "error": {
                "message": "",
                "title": "",
                "className": "java.lang.ClassCastException"
            }, "totalRows": 0
        }
    }

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/process/ProcessHQLQuery.java#l277 [^]
[2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/process/ProcessHQLQuery.java#l318 [^]
No tags attached.
related to defect 0038497 closed StoreServer If the store server receives a response from the central server with bad JSON format, it should not go offline 
Issue History
2018-05-07 15:24AugustoMauchNew Issue
2018-05-07 15:24AugustoMauchAssigned To => Retail
2018-05-07 15:24AugustoMauchTriggers an Emergency Pack => No
2018-05-07 15:40AugustoMauchRelationship addedrelated to 0038497
2018-10-08 20:58rqueraltaAssigned ToRetail => rqueralta
2018-10-08 20:58rqueraltaStatusnew => scheduled

There are no notes attached to this issue.