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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038874
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2018-07-03 08:562018-07-04 17:38
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision7a04ce4e7311
ProjectionnoneETAnoneTarget Version
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

0038874: Is not possible to log-in in WebPOS using Hibernate 5.3

DescriptionIs not possible to log-in in WebPOS using Hibernate 5.3
Steps To Reproduce1) 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)
...
Proposed SolutionThe 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.

TagsNo tags attached.
Attached Filesdiff file icon simpleQueryBuilder.diff [^] (679 bytes) 2018-07-03 08:56 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
blocks feature request 0037064 closedcaristu Openbravo ERP upgrade hibernate to 5.3.2 

-  Notes
(0105538)
hgbot (developer)
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 (developer)
2018-07-04 17:38

Tested and reviewed

- Issue History
Date Modified Username Field Change
2018-07-03 08:56 caristu New Issue
2018-07-03 08:56 caristu Assigned To => platform
2018-07-03 08:56 caristu File Added: simpleQueryBuilder.diff
2018-07-03 08:56 caristu Modules => Core
2018-07-03 08:56 caristu Triggers an Emergency Pack => No
2018-07-03 08:56 caristu Project Openbravo ERP => Retail Modules
2018-07-03 08:57 caristu Assigned To platform => Retail
2018-07-03 08:57 caristu Category A. Platform => Web POS
2018-07-03 08:57 caristu Relationship added blocks 0037064
2018-07-03 09:42 hgbot Checkin
2018-07-03 09:42 hgbot Note Added: 0105538
2018-07-03 09:42 hgbot Status new => resolved
2018-07-03 09:42 hgbot Resolution open => fixed
2018-07-03 09:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7a04ce4e731138b2dd065fb001efe8d38b5e8231 [^]
2018-07-03 09:43 caristu Review Assigned To => migueldejuana
2018-07-03 10:06 caristu Assigned To Retail => caristu
2018-07-04 17:38 migueldejuana Note Added: 0105595
2018-07-04 17:38 migueldejuana Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker