Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038874Retail ModulesWeb POSpublic2018-07-03 08:562018-07-04 17:38
caristu 
caristu 
urgentminorhave not tried
closedfixed 
5
 
 
migueldejuana
No
0038874: Is not possible to log-in in WebPOS using Hibernate 5.3
Is not possible to log-in in WebPOS using Hibernate 5.3
1) Build Openbravo (with Retail pack) using Hibernate 5.3 (https://code.openbravo.com/erp/devel/pi-hb53 [^])
2) Try to log-in in a terminal. ERROR. The following error is raised in the log:

98132 [http-bio-8080-exec-3] ERROR org.openbravo.retail.posterminal.term.Terminal - Terminal exception: Named parameter not bound : valueEqArray0Stacktrace: [Ljava.lang.StackTraceElement;@76ab30ad
98141 [http-bio-8080-exec-3] ERROR org.openbravo.mobile.core.process.SecuredJSONProcess - Named parameter not bound : valueEqArray0
org.openbravo.base.exception.OBException: Named parameter not bound : valueEqArray0
    at org.openbravo.retail.posterminal.term.Terminal.exec(Terminal.java:287)
...
The problem is caused because the SimpleQueryBuilder.fillQueryWithParameters is not replacing the parameters properly. This is because in Hibernate 5.3 query.toString() does not contain the sql string anymore.

The query.getQueryString() can be used instead. See attached patch with the proposed solution.

No tags attached.
blocks feature request 0037064 closed caristu Openbravo ERP upgrade hibernate to 5.3.2 
diff simpleQueryBuilder.diff (679) 2018-07-03 08:56
https://issues.openbravo.com/file_download.php?file_id=11925&type=bug
Issue History
2018-07-03 08:56caristuNew Issue
2018-07-03 08:56caristuAssigned To => platform
2018-07-03 08:56caristuFile Added: simpleQueryBuilder.diff
2018-07-03 08:56caristuModules => Core
2018-07-03 08:56caristuTriggers an Emergency Pack => No
2018-07-03 08:56caristuProjectOpenbravo ERP => Retail Modules
2018-07-03 08:57caristuAssigned Toplatform => Retail
2018-07-03 08:57caristuCategoryA. Platform => Web POS
2018-07-03 08:57caristuRelationship addedblocks 0037064
2018-07-03 09:42hgbotCheckin
2018-07-03 09:42hgbotNote Added: 0105538
2018-07-03 09:42hgbotStatusnew => resolved
2018-07-03 09:42hgbotResolutionopen => fixed
2018-07-03 09:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7a04ce4e731138b2dd065fb001efe8d38b5e8231 [^]
2018-07-03 09:43caristuReview Assigned To => migueldejuana
2018-07-03 10:06caristuAssigned ToRetail => caristu
2018-07-04 17:38migueldejuanaNote Added: 0105595
2018-07-04 17:38migueldejuanaStatusresolved => closed

Notes
(0105538)
hgbot   
2018-07-03 09:42   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7a04ce4e731138b2dd065fb001efe8d38b5e8231
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Jul 03 09:35:12 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7a04ce4e731138b2dd065fb001efe8d38b5e8231 [^]

fixes issue 38874: use getQueryString() instead of toString()

  In newest Hibernate versions Query.toString() does not include the string containing the HQL query. Therefore, that method can not be used when filling the query parameters, because the parameters will not be found in the string representation of the query.

  The Query.getQueryString() method should be used instead, which directly returns the string containing the query.

---
M src/org/openbravo/mobile/core/process/SimpleQueryBuilder.java
---
(0105595)
migueldejuana   
2018-07-04 17:38   
Tested and reviewed