Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039149Openbravo ERPA. Platformpublic2018-08-17 11:522018-09-24 16:15
Triage Finance 
closedno change required 
0039149: Error message thrown by Oracle trigger after Hibernate upgrade [Oracle only]
One of our AWO JUnit test is failing after the Hibernate upgrade in Oracle only. It seems there is a regression in the way the message is caught, parsed and then sent to the UI.
It is easily reproducible in the mod-awo job. See for example [^]

Error message:

The exception thrown should have been "could not execute update query" :
Expected: "ERROR: @OBAWO_FlowEnabled@"
     but: was "ORA-20000: @OBAWO_FlowEnabled@\nORA-06512: at \"MOD_SIMPLE_CI23141.OBAWO_M_TRANSACTION_TRG\", line 151\nORA-04088: error during execution of trigger 'MOD_SIMPLE_CI23141.OBAWO_M_TRANSACTION_TRG'\n"
Change the code that parses the error message thrown by the trigger in Oracle to behave the same way as before the Hibernate upgrade
No tags attached.
related to defect 00219113.0MP18 closed ioritzCia Wrong error when processing inventory 
caused by feature request 0037064 closed caristu upgrade hibernate to 5.3.2 
related to defect 0039163 closed AtulOpenbravo QueryTimeoutException is no longer thrown in Oracle after Hibernate 5.3 upgrade 
Issue History
2018-08-17 11:52vmromanosNew Issue
2018-08-17 11:52vmromanosAssigned To => platform
2018-08-17 11:52vmromanosModules => Core
2018-08-17 11:52vmromanosTriggers an Emergency Pack => No
2018-08-17 11:53vmromanosRelationship addedcaused by 0037064
2018-08-20 13:20caristuRelationship addedrelated to 0021911
2018-08-21 08:32caristuNote Added: 0106416
2018-08-21 08:33caristuNote Edited: 0106416bug_revision_view_page.php?bugnote_id=0106416#r17544
2018-08-21 09:35caristuAssigned Toplatform => Triage Finance
2018-08-21 13:11caristuRelationship addedrelated to 0039163
2018-09-24 16:15caristuReview Assigned To => caristu
2018-09-24 16:15caristuNote Added: 0106970
2018-09-24 16:15caristuStatusnew => closed
2018-09-24 16:15caristuResolutionopen => no change required
2018-09-24 16:15caristuFixed in Version => 3.0PR18Q4

2018-08-21 08:32   
(edited on: 2018-08-21 08:33)
This issue is caused due to an internal change in the exception handling performed by Hibernate. In this case, a GenericJDBCException is now thrown instead of a QueryTimeoutException.

To fix this issue, I think that the best solution is to adapt the code when catching the GenericJDBCException.

- In the test: assert using containsString as it is done for the QueryTimeoutException ( [^])

- In the InventoryCountProcess: parse the message as it is done for the QueryTimeoutException to show the error message properly in the UI ( [^])

2018-09-24 16:15   
- Test is fixed. See[1]
- Exception handling in InventoryCountProcess should be fixed with issue 0039163

See here[2] to see the updated information in the Migration Guide.

[1] [^]

[2] [^]