Openbravo Issue Tracking System - Modules
View Issue Details
0039181ModulesExternal Integration Infrastructurepublic2018-08-24 10:042018-09-21 10:25
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
 
caristu
0039181: If an exception is thrown when importing an item, the error message stored in the EDL Request Line is not meaningful
If an exception is raised in a trigger (i.e. RAISE EXCEPTION '%', '@20501@';) when importing an item using the external connector infrastructure, the error message stored in the EDL Request Line is not meaningful: "Could not execute JDBC Batch"

Instead, the parsed message should be stored (i.e. "Document posted/processed" instead for exception "@20501@").
- Install the EDL examples module [1]. It has a process that creates entries of Unit of Measure using EDL.
- Install the attached patch. It modifies a trigger on c_uom so that an error is raised when a new unit of measure is created.
- On the ERP, execute the Import UOM process. It will create some EDL Requests, and open that window.
- Check that the EDL Request line failed (it is expected because of the patch on the trigger function), and check that the error message is not meaningful.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration.examples/ [^]
No tags attached.
related to defect 0039190 closed AugustoMauch Update catch blocks in to support latest version of Hibernate 
png BeforeParsingErrorMessage.png (53,778) 2018-08-24 10:08
https://issues.openbravo.com/file_download.php?file_id=12073&type=bug
png

png AfterParsingErrorMessage.png (49,877) 2018-08-24 10:08
https://issues.openbravo.com/file_download.php?file_id=12074&type=bug
png

diff forceErrorInUomTrigger.diff (367) 2018-08-27 10:05
https://issues.openbravo.com/file_download.php?file_id=12081&type=bug
Issue History
2018-08-24 10:04AugustoMauchNew Issue
2018-08-24 10:04AugustoMauchAssigned To => AugustoMauch
2018-08-24 10:08AugustoMauchFile Added: BeforeParsingErrorMessage.png
2018-08-24 10:08AugustoMauchFile Added: AfterParsingErrorMessage.png
2018-08-24 10:17hgbotCheckin
2018-08-24 10:17hgbotNote Added: 0106473
2018-08-24 10:30hgbotCheckin
2018-08-24 10:30hgbotNote Added: 0106475
2018-08-24 10:30hgbotStatusnew => resolved
2018-08-24 10:30hgbotResolutionopen => fixed
2018-08-24 10:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/6857ad09380c6c0334d6c77cb5963e4b016c5d3f [^]
2018-08-24 10:32AugustoMauchReview Assigned To => caristu
2018-08-27 09:34AugustoMauchRelationship addedrelated to 0039190
2018-08-27 09:59AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17570#r17570
2018-08-27 10:03hgbotCheckin
2018-08-27 10:03hgbotNote Added: 0106490
2018-08-27 10:05AugustoMauchFile Added: forceErrorInUomTrigger.diff
2018-09-10 09:31caristuNote Added: 0106645
2018-09-10 09:31caristuStatusresolved => closed
2018-09-10 13:04hgbotCheckin
2018-09-10 13:04hgbotNote Added: 0106660
2018-09-10 13:04hgbotStatusclosed => resolved
2018-09-10 13:04hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/6857ad09380c6c0334d6c77cb5963e4b016c5d3f [^] => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/c709bda2313efe50915013d10277d4e0a04bc076 [^]
2018-09-10 13:05hgbotCheckin
2018-09-10 13:05hgbotNote Added: 0106661
2018-09-21 10:25caristuStatusresolved => closed

Notes
(0106473)
hgbot   
2018-08-24 10:17   
Repository: erp/pmods/org.openbravo.service.external.integration
Changeset: 1c5e5fd8c02138239a7344d9761f90cb7d9fd844
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Aug 24 10:17:05 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/1c5e5fd8c02138239a7344d9761f90cb7d9fd844 [^]

Related with issue 39181: Use DbUtility.getUnderlyingSQLException in exception

Use DbUtility.getUnderlyingSQLException so that the exception message is Error: "@20501@" instead
of "Could not execute JDBC Batch".

The updated error message will later on be parsed when the exception is managed in the
AsynchronousProcessor class.

---
M src/org/openbravo/service/external/integration/edl/BaseImportItemProcessor.java
---
(0106475)
hgbot   
2018-08-24 10:30   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 6857ad09380c6c0334d6c77cb5963e4b016c5d3f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Aug 24 10:29:52 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/6857ad09380c6c0334d6c77cb5963e4b016c5d3f [^]

Fixes issue 39181: AsynchronousProcessor parses exception messages

AsynchronousProcessor now calls OBMessageUtils.parseTranslation to parse the exception message
before storing it.

For instance, "Error: @20501@" will be replaced by "Document posted/processed"

---
M src/org/openbravo/externaldata/integration/process/AsynchronousProcessor.java
---
(0106490)
hgbot   
2018-08-27 10:03   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 0f6fefa057972925659817f684ca8ef1bfb46f1f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Aug 27 10:03:50 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/0f6fefa057972925659817f684ca8ef1bfb46f1f [^]

Related with issue 39181: Parse error in the proper method

Instead of parsing the error message in one of the invocations to saveFailedItem, parse the message
in the saveFailedItem method itself.

---
M src/org/openbravo/externaldata/integration/process/AsynchronousProcessor.java
---
(0106645)
caristu   
2018-09-10 09:31   
Reviewed + tested
(0106660)
hgbot   
2018-09-10 13:04   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: c709bda2313efe50915013d10277d4e0a04bc076
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Aug 24 10:29:52 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/c709bda2313efe50915013d10277d4e0a04bc076 [^]

Fixes issue 39181: AsynchronousProcessor parses exception messages

AsynchronousProcessor now calls OBMessageUtils.parseTranslation to parse the exception message
before storing it.

For instance, "Error: @20501@" will be replaced by "Document posted/processed"

---
M src/org/openbravo/externaldata/integration/process/AsynchronousProcessor.java
---
(0106661)
hgbot   
2018-09-10 13:05   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 327b7cebc3f531913049b7ae3200afe724dfbdf6
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Aug 27 10:03:50 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/327b7cebc3f531913049b7ae3200afe724dfbdf6 [^]

Related with issue 39181: Parse error in the proper method

Instead of parsing the error message in one of the invocations to saveFailedItem, parse the message
in the saveFailedItem method itself.

---
M src/org/openbravo/externaldata/integration/process/AsynchronousProcessor.java
---