Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0042871 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2020-01-14 17:19 | 2020-01-17 09:48 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR20Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | da317d971901 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0042871: missing log for failing DAL property validations | |||||||
Description | When DAL fails to validate a property the failing property is logged but not the entity it belongs to. When the validation that failed is the one checking the size of the value, the complete value is logged, causing a flood in the log. | |||||||
Steps To Reproduce | ie. execute the following code: Alert a = OBProvider.getInstance().get(Alert.class); a.setDescription(org.apache.commons.lang.StringUtils.repeat("-", 2001)); The following error is displayed: org.openbravo.base.validation.ValidationException: description: Value (---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------) is too long, it has length 2001, the maximum allowed length is 2000 | |||||||
Proposed Solution | Change the log to: 1. Include entity name 2. First display error info, later context 3. Truncate context if it is too long In this case the error should be something like org.openbravo.base.validation.ValidationException: ADAlert.description is too long, it has length 2001, the maximum allowed length is 2000: Value (------------------------------------------------...) | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0116887) alostale (manager) 2020-01-15 10:19 |
MR: https://gitlab.com/openbravo/product/openbravo/merge_requests/33 [^] |
(0116976) hgbot (developer) 2020-01-17 09:24 |
Repository: erp/devel/pi Changeset: da317d9719017833c021481154b4c7fd130adf44 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Wed Jan 15 09:14:17 2020 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/da317d9719017833c021481154b4c7fd130adf44 [^] fixed BUG-42871: missing log for failing DAL property validations This fix: - Shows in the log the entity name together with the property that didn't pass the validation - For String too long value validation: - It truncates the value shown in log after 100 chars - Relevant information (current and max sizes) is displayed before the actual value --- M src/org/openbravo/base/validation/StringPropertyValidator.java M src/org/openbravo/base/validation/ValidationException.java --- |
(0116979) caristu (developer) 2020-01-17 09:48 |
Reviewed + tested OK |
Issue History | |||
Date Modified | Username | Field | Change |
2020-01-14 17:19 | alostale | New Issue | |
2020-01-14 17:19 | alostale | Assigned To | => platform |
2020-01-14 17:19 | alostale | Modules | => Core |
2020-01-14 17:19 | alostale | Triggers an Emergency Pack | => No |
2020-01-14 17:28 | alostale | Steps to Reproduce Updated | View Revisions |
2020-01-14 17:28 | alostale | Proposed Solution updated | |
2020-01-15 10:19 | alostale | Note Added: 0116887 | |
2020-01-15 10:20 | alostale | Relationship added | blocks 0036162 |
2020-01-15 10:20 | alostale | Assigned To | platform => alostale |
2020-01-15 10:20 | alostale | Review Assigned To | => caristu |
2020-01-17 09:24 | hgbot | Checkin | |
2020-01-17 09:24 | hgbot | Note Added: 0116976 | |
2020-01-17 09:24 | hgbot | Status | new => resolved |
2020-01-17 09:24 | hgbot | Resolution | open => fixed |
2020-01-17 09:24 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/da317d9719017833c021481154b4c7fd130adf44 [^] |
2020-01-17 09:48 | caristu | Note Added: 0116979 | |
2020-01-17 09:48 | caristu | Status | resolved => closed |
2020-01-17 09:48 | caristu | Fixed in Version | => 3.0PR20Q2 |
Copyright © 2000 - 2009 MantisBT Group |