Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028631Openbravo ERPA. Platformpublic2015-01-15 17:392022-02-01 08:05
gorkaion 
Triage Platform Base 
normalminoralways
acknowledgedopen 
20Gentoo
 
 
JSON Datasource
No
0028631: HQLDataSourceService setAdminMode without try & finally
The getData method of HQLDataSourceService does a OBContext.setAdminMode(true); but there is not a try & finally block to ensure that the restorePreviousMode is always executed.

It is common during development to raise exceptions on this method when the HQL query is wrong. In this cases the log shows the unbalanced calls to admin mode warning as the restore is not executed.
On an HQL Query based table modify the HQL so it is not a valid one.
Open the process that uses that table and check the log.

1. As System Administrator:
2. Modify the aprm_orderinvoice table so the HQL is wrong.
3. As Openbravo Admin:
4. Open the Sales Invoice window and search one that is not paid.
5. Open the Add Payment pick and execute, the invoices grid is empty.
6. Check the log and see the unbalanced calls warning.
No tags attached.
related to feature request 0028633 new AugustoMauch Better log of SqlGrammarException 
Issue History
2015-01-15 17:39gorkaionNew Issue
2015-01-15 17:39gorkaionAssigned To => AugustoMauch
2015-01-15 17:39gorkaionModules => JSON Datasource
2015-01-15 17:39gorkaionTriggers an Emergency Pack => No
2015-01-15 18:31gorkaionIssue cloned0028633
2015-01-15 18:31gorkaionRelationship addedrelated to 0028633
2015-03-11 10:07alostaleStatusnew => acknowledged
2015-03-17 14:38alostaleAssigned ToAugustoMauch => platform
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.