Openbravo Issue Tracking System - Modules
View Issue Details
0037913ModulesDB Pool Logging Utilitiespublic2018-02-14 12:562018-03-06 13:27
joniturralde93 
alostale 
urgentmajoralways
closedfixed 
5
 
 
caristu
0037913: Exception thrown by trigger is logged as UndeclaredThrowableException instead of real one
When a trigger exception is thrown, the invoke method of StatementInvocationHandler throws an InvocationTargetException and later hibernate is throwing as UndeclaredThrowableException, which is not properly handled by Openbravo.
1. Install and configure DB Pool Logging Utilities to log slow statements
2. With no modules in dev log in as System Admin
3. Open Sales Order window definition
4. Edit its description
5. Save
  -> GOT: Generic error message: "Saving failed"
     EXPECTED: Concrete error message as thrown by trigger: "Saving failed. Cannot update an object in a module not in development and without an active template"
The invoke method of StatementInvocationHandler should catch these exceptions and throw the original ones.
No tags attached.
Issue History
2018-02-14 12:56joniturralde93New Issue
2018-02-14 12:56joniturralde93Assigned To => platform
2018-02-14 12:56joniturralde93Resolution time => 1520377200
2018-02-14 15:03PracticsIssue Monitored: Practics
2018-02-20 08:05alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16741#r16741
2018-02-20 08:05alostaleAssigned Toplatform => alostale
2018-02-20 08:05alostaleReview Assigned To => caristu
2018-02-20 08:15hgbotCheckin
2018-02-20 08:15hgbotNote Added: 0102505
2018-02-20 08:15hgbotStatusnew => resolved
2018-02-20 08:15hgbotResolutionopen => fixed
2018-02-20 08:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.util.db/rev/f327c49b345903ca9ed6c77c6675ba2a3ce79c90 [^]
2018-02-20 08:17alostaleNote Added: 0102506
2018-03-06 13:27caristuNote Added: 0103027
2018-03-06 13:27caristuStatusresolved => closed

Notes
(0102505)
hgbot   
2018-02-20 08:15   
Repository: erp/mods/org.openbravo.util.db
Changeset: f327c49b345903ca9ed6c77c6675ba2a3ce79c90
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 20 08:11:26 2018 +0100
URL: http://code.openbravo.com/erp/mods/org.openbravo.util.db/rev/f327c49b345903ca9ed6c77c6675ba2a3ce79c90 [^]

fixed bug 37913: statement exceptions were wrapped by InvocationTargetException

  This caused the code in charge of dealing with them (ie. to show proper messages)
  not to be able to handle it.

  When one of this exceptions occurs, instead of re-trhowing the InvocationTargetException
  we now throw the exception occurred in the underlying method.

---
M src/org/openbravo/util/db/StatementInvocationHandler.java
---
(0102506)
alostale   
2018-02-20 08:17   
fix included in version 0.1.200
(0103027)
caristu   
2018-03-06 13:27   
Code reviewed + tested OK.