Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031451Openbravo ERPA. Platformpublic2015-11-12 12:532015-12-09 16:27
aferraz 
aferraz 
normalminoralways
closedfixed 
30Professional Appliance
 
3.0PR16Q13.0PR16Q1 
alostale
Core
No
0031451: Error should not be logged in case we throw an OBException with logException parameter as false
In case we throw an OBException from an Event Handler calling OBException(String message, Throwable cause, boolean logException) method with logException parameter as false, error will be raised in the log by DefaultDataSourceService.update method (line 833), while it should not.
- In FIN_FinaccTransactionEventListener class, validateTransactionType method, line 82, change the following line:
  throw new OBException("@APRM_INVALID_TRANSACTION@");
into this one:
  throw new OBException("@APRM_INVALID_TRANSACTION@", null, false);

As F&B Admin:

- Select Cuenta de Banco Financial Account
  Create a new record in Transaction tab, but do not change any field.
  Click on Save button.
  Realize @APRM_INVALID_TRANSACTION@ error is shown in the log, although you have thrown it with logException as false: org.openbravo.base.exception.OBException: @APRM_INVALID_TRANSACTION@
No tags attached.
related to defect 0031674 closed alostale Openbravo ERP too verbose log for invalid login attempt 
blocks design defect 0031452 closed aferraz Openbravo ERP Controlled exceptions should not be logged in error mode 
blocks defect 0036191 closed collazoandy4 Modules Functional validations in REM_RemittanceProcess are logged as exceptions in the log 
Issue History
2015-11-12 12:53aferrazNew Issue
2015-11-12 12:53aferrazAssigned To => aferraz
2015-11-12 12:53aferrazModules => Core
2015-11-12 12:53aferrazTriggers an Emergency Pack => No
2015-11-12 12:54aferrazStatusnew => scheduled
2015-11-12 12:54aferrazReview Assigned To => alostale
2015-11-12 14:36hgbotCheckin
2015-11-12 14:36hgbotNote Added: 0081758
2015-11-12 14:36hgbotStatusscheduled => resolved
2015-11-12 14:36hgbotResolutionopen => fixed
2015-11-12 14:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/425220984e4ed06edc7f21c3963f617c3aee2a0c [^]
2015-11-12 14:43aferrazRelationship addedblocks 0031452
2015-11-16 14:39alostaleNote Added: 0081888
2015-11-16 14:39alostaleStatusresolved => closed
2015-11-16 14:39alostaleFixed in Version => 3.0PR16Q1
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082210
2015-12-09 16:27alostaleRelationship addedrelated to 0031674
2017-06-14 16:58aferrazRelationship addedblocks 0036191

Notes
(0081758)
hgbot   
2015-11-12 14:36   
Repository: erp/devel/pi
Changeset: 425220984e4ed06edc7f21c3963f617c3aee2a0c
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Nov 12 13:02:15 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/425220984e4ed06edc7f21c3963f617c3aee2a0c [^]

Fixes issue 31451: OBException logged when it should not

DefaultJsonDataService will check if it is needed to log localThrowable exception, in case it is an OBException.
New method added in OBException to allow throw exceptions without throwable cause and without log them.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M src/org/openbravo/base/exception/OBException.java
---
(0081888)
alostale   
2015-11-16 14:39   
code reviewed
(0082210)
hudsonbot   
2015-11-23 21:17   
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/7b56bebaaa88 [^]
Maturity status: Test