Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036183Openbravo ERPA. Platformpublic2017-06-06 12:182017-07-24 12:12
adrianromero 
platform 
lowminorhave not tried
closedno change required 
5
 
 
alostale
Core
No
0036183: Platform: EntityPersistenceEventObserver validations has a high log level
Entity validations created extending EntityPersistenceEventObserver, when the validation fails an exception is thrown, and it is registered in the openbravo log file. These kind of exceptions are functional validations and should not be registered in the openbravo log with a high level
For example to make fail the validation implemented in org.openbravo.retail.posterminal.event.ProductEventHandler, try to create a product with type "Service" and checked "Show stock". The validation appears and the record cannot be saved. Observe the openbravo log a exception is registered.
The infrastructure does not log anything by default. The problem is some of these observers are throwing OBException, which by default log stack traces.

Candidates to check:

$ find -name *.java | xargs grep "extends.*EntityPersistenceEventObserver" -l | xargs grep OBException -l | sort

== Functional ==
./modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java
./modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_PaymentEventListener.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java
./src/org/openbravo/event/ConversionRateEventHandler.java
./src/org/openbravo/event/DocTypeEventHandler.java
./src/org/openbravo/event/GLJournalLineEventHandler.java
./src/org/openbravo/event/InvoiceTaxEventHandler.java
./src/org/openbravo/event/MInOutLineEventHandler.java
./src/org/openbravo/event/OrderDiscountEventHandler.java
./src/org/openbravo/event/PeriodEventHandler.java
./src/org/openbravo/event/ProductAumEventHandler.java
./src/org/openbravo/event/ProductCharacteristicEventHandler.java
./src/org/openbravo/event/ProductEventHandler.java
./src/org/openbravo/event/ProductionLineEventHandler.java
./src/org/openbravo/event/ServiceOrderLineEventHandler.java
./src/org/openbravo/event/ServicePriceRuleRangeEventHandler.java
./src/org/openbravo/event/SimpleGLJournalEventHandler.java
./src/org/openbravo/event/UOMConversionEventHandler.java


== Platform ==
./modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentConfigEventHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentMetadataEventHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/FieldHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/NoteEventHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RoleAccessUniqueHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TableEventHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TableTreeEventHandler.java
./modules/org.openbravo.client.application/src/org/openbravo/client/application/event/WindowPersonalizationEventHandler.java
./src/org/openbravo/event/ADTableEventHandler.java
./src/org/openbravo/event/ProcessRequestEventHandler.java


== Retail ==
./modules/org.openbravo.mobile.core/src/org/openbravo/mobile/core/servercontroller/MultiServerPreferenceEventHandler.java
./modules/org.openbravo.mobile.core/src/org/openbravo/mobile/core/servercontroller/ServerStateBackgroundEventHandler.java
./modules/org.openbravo.retail.discounts/src/org/openbravo/retail/discounts/event/MOfferEventHandler.java
./modules/org.openbravo.retail.discounts/src/org/openbravo/retail/discounts/event/MOfferProductEventHandler.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/event/ADOrgWarehouseEventHandler.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/event/AppPaymentEventHandler.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/event/PaymentMethodEventHandler.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/event/PaymentMethodTypeEventHandler.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/event/ProductEventHandler.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/event/TerminalTypePaymentMethodEventHandler.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java
./modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/PaymentMethodHandler.java
SER-QA
related to design defect 0036527 closed alostale Openbravo ERP OBException should not log itself by default 
related to defect 0036207 closed markmm82 Openbravo ERP Finance: EntityPersistenceEventObserver validations has a high log level 
related to defect 0036208 new Retail Retail Modules Retail: EntityPersistenceEventObserver validations has a high log level 
blocks design defect 0036162 acknowledged Triage Platform Base Openbravo ERP clean up openbravo.log 
Issue History
2017-06-06 12:18adrianromeroNew Issue
2017-06-06 12:18adrianromeroAssigned To => platform
2017-06-06 12:18adrianromeroModules => Core
2017-06-06 12:18adrianromeroResolution time => 1497909600
2017-06-06 12:18adrianromeroTriggers an Emergency Pack => No
2017-06-06 12:19adrianromeroTag Attached: SER-QA
2017-06-08 11:03alostaleRelationship addedblocks 0036162
2017-06-08 11:03alostaleNote Added: 0097204
2017-06-08 11:03alostalePrioritynormal => low
2017-06-08 11:03alostaleSeveritymajor => minor
2017-06-08 11:03alostaleStatusnew => acknowledged
2017-06-08 11:03alostaleResolution time1497909600 =>
2017-06-08 13:35alostaleNote Added: 0097216
2017-06-08 14:27alostaleProposed Solution updated
2017-06-08 14:27alostaleNote Deleted: 0097216
2017-06-08 14:28alostaleIssue cloned0036207
2017-06-08 14:28alostaleRelationship addedrelated to 0036207
2017-06-08 14:30alostaleIssue cloned0036208
2017-06-08 14:30alostaleRelationship addedrelated to 0036208
2017-06-08 14:34alostaleSummaryEntityPersistenceEventObserver validations has a high log level => Platform: EntityPersistenceEventObserver validations has a high log level
2017-06-08 14:34alostaleProposed Solution updated
2017-07-24 12:06alostaleRelationship addedrelated to 0036527
2017-07-24 12:11alostaleStatusacknowledged => scheduled
2017-07-24 12:12alostaleStatusscheduled => feedback
2017-07-24 12:12alostaleReview Assigned To => alostale
2017-07-24 12:12alostaleNote Added: 0098198
2017-07-24 12:12alostaleStatusfeedback => closed
2017-07-24 12:12alostaleResolutionopen => no change required

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

[1] http://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines#How_to_Choose_the_Right_Severity [^]
(0098198)
alostale   
2017-07-24 12:12   
After OBException behavior change (0036527) all cases have been reviewed and none of them make sense to be logged.