Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036193Openbravo ERPA. Platformpublic2017-06-07 17:512017-06-09 15:32
adrianromero 
alostale 
lowminorhave not tried
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
No
0036193: DefaultJsonDataService logs an exception if property *obSelected* is not found in the Entity when fetching data for PickAndEdit
DefaultJsonDataService checks for the value of obSelected when fetching data for PickAndEdit in order to adapt the page size to include all selected records into the response. The problem is that obSelected property does not exist in the entity an exception is registered in the Openbravo log but this case is silently ignored by DefautJsonDataService considering no action should be performed.

This is the line where obSelected value is requested to the entity: https://code.openbravo.com/erp/devel/pi/annotate/70c67cc6cf8b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java#l350 [^]
This has been detected due to the following log record:

ERROR org.openbravo.base.util.CheckException - Property obSelected does not exist for entity FIN_Payment
org.openbravo.base.util.CheckException: Property obSelected does not exist for entity FIN_Payment
at org.openbravo.base.util.Check.isNotNull(Check.java:72)
at org.openbravo.base.model.Entity.getProperty(Entity.java:568)
at org.openbravo.base.model.Entity.getProperty(Entity.java:550)
at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:254)
at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:232)
at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:213)
at org.openbravo.service.json.DefaultJsonDataService.isLastRecordSelected(DefaultJsonDataService.java:380)
at org.openbravo.service.json.DefaultJsonDataService.shouldIncreasePageSize(DefaultJsonDataService.java:368)
at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:252)
at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:85)
at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:78)
at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:285)
at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:843)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228)
at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:452)
at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:58)
at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.ap
Avoid asking directly the value of obSelected. Check first whether obSelected exists or not in the entity fetched. See attached patch.
SER-QA
related to defect 0033622 closed caristu Wrong behavior in Select Payment Pick/Execute Window when having >100 records selected 
related to defect 0040381 closed alostale incorrect warn message logged by ReadOnlyDataSourceService for P&E  
blocks design defect 0036162 acknowledged Triage Platform Base clean up openbravo.log 
patch issue0036193.patch (1,157) 2017-06-07 17:54
https://issues.openbravo.com/file_download.php?file_id=10830&type=bug
Issue History
2017-06-07 17:51adrianromeroNew Issue
2017-06-07 17:51adrianromeroAssigned To => platform
2017-06-07 17:51adrianromeroModules => Core
2017-06-07 17:51adrianromeroResolution time => 1497996000
2017-06-07 17:51adrianromeroTriggers an Emergency Pack => No
2017-06-07 17:51adrianromeroTag Attached: SER-QA
2017-06-07 17:53adrianromeroRelationship addedrelated to 0033622
2017-06-07 17:54adrianromeroFile Added: issue0036193.patch
2017-06-08 10:58alostaleRelationship addedblocks 0036162
2017-06-08 11:02alostaleResolution time1497996000 =>
2017-06-08 11:02alostaleNote Added: 0097203
2017-06-08 11:02alostalePriorityhigh => low
2017-06-08 11:02alostaleSeveritymajor => minor
2017-06-08 11:02alostaleStatusnew => acknowledged
2017-06-08 15:05hgbotCheckin
2017-06-08 15:05hgbotNote Added: 0097221
2017-06-08 15:05hgbotStatusacknowledged => resolved
2017-06-08 15:05hgbotResolutionopen => fixed
2017-06-08 15:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1982405354887d1be6897cbf4eb7d8668cd925a7 [^]
2017-06-08 15:07alostaleReview Assigned To => caristu
2017-06-08 15:07alostaleAssigned Toplatform => alostale
2017-06-09 02:49hudsonbotCheckin
2017-06-09 02:49hudsonbotNote Added: 0097263
2017-06-09 15:32caristuNote Added: 0097292
2017-06-09 15:32caristuStatusresolved => closed
2017-06-09 15:32caristuFixed in Version => 3.0PR17Q3
2019-03-22 09:57alostaleRelationship addedrelated to 0040381

Notes
(0097203)
alostale   
2017-06-08 11:02   
Downgraded severity according to reporting guidelines [1].

[1] http://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines#How_to_Choose_the_Right_Severity [^]
(0097221)
hgbot   
2017-06-08 15:05   
Repository: erp/devel/pi
Changeset: 1982405354887d1be6897cbf4eb7d8668cd925a7
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 08 15:03:10 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1982405354887d1be6897cbf4eb7d8668cd925a7 [^]

fixed bug 36193: fetch for P&E logs error if obSelected property does not exist

  Even exception was logged it was not thrown up, correctly returning false. This
  event shouldn't be logged at all.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
(0097263)
hudsonbot   
2017-06-09 02:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/682983c2eead [^]
Maturity status: Test
(0097292)
caristu   
2017-06-09 15:32   
Code reviewed