Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028633Openbravo ERPA. Platformpublic2015-01-15 18:312015-01-15 18:31
gorkaion 
AugustoMauch 
normalminoralways
newopen 
20Gentoo
 
 
JSON Datasource
No
0028633: Better log of SqlGrammarException
When the HQL of a HQLDataSourceService fails with an SqlGrammarException the log of the error is not meaningful.

It would be nice if this type of exceptions are caught so the sql causing them is also included in the log using the SqlGrammarException.getSql() method.
On an HQL based table modify it so it throws an SQLGrammarException
This kind of exception is thrown at least by the list() method executed in the getData() method of the HQLDataSourceService class. The exception is managed by the handleException() method of the DataSourceServlet class.

There are 2 possibilities:
1. Add a cast in the DataSourceServlet.class so any datasource implementation throwing this exception is covered.
2. Add a try/catch in the HQLDataSourceService class for SQLGrammarExceptions to log the wrong SQL and throw it again so it is managed by the DataSourceServlet as usual.
No tags attached.
related to defect 0028631 acknowledged Triage Platform Base HQLDataSourceService setAdminMode without try & finally 
Issue History
2015-01-15 18:31gorkaionNew Issue
2015-01-15 18:31gorkaionAssigned To => AugustoMauch
2015-01-15 18:31gorkaionModules => JSON Datasource
2015-01-15 18:31gorkaionTriggers an Emergency Pack => No
2015-01-15 18:31gorkaionIssue generated from0028631
2015-01-15 18:31gorkaionRelationship addedrelated to 0028631

There are no notes attached to this issue.