Openbravo Issue Tracking System - Modules
View Issue Details
0040215ModulesExternal Data Integrationpublic2019-02-15 11:472019-06-11 10:39
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
AugustoMauch
0040215: An orphan import entry is left when the execution of a batch fails
An orphan import entry is left when the execution of a batch fails
0a) Install the EDL examples module[1]
0b) Apply the attached patch. It will force the failure in the batch processing of the sample EDL process.
0c) Run ant smartbuild -Dlocal=no
1) Go to the [EDL Configuration] window and create a new configuration for the "UOM Import Process".
2) Run the [Import UOM Asynchronously] process.
3) Check the logs. Note that apart from the errors in the batch processing. There are some additional errors:

ERROR org.openbravo.service.importprocess.ImportEntryProcessor.ImportEntryProcessRunnable - null
java.lang.NullPointerException: null
    at org.openbravo.externaldata.integration.process.EDLImportEntryProcessor$EDLEntryProcessRunnable.shouldWaitForDependencies(EDLImportEntryProcessor.java:170) ~[classes/:?]
    at org.openbravo.externaldata.integration.process.EDLImportEntryProcessor$EDLEntryProcessRunnable.processEntry(EDLImportEntryProcessor.java:144) ~[classes/:?]
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:376) [classes/:?]
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:297) [classes/:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_191]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_191]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
2019-02-15 11:43:10,855 [Import Entry - 4] ERROR org.openbravo.service.importprocess.ImportEntryProcessor.ImportEntryProcessRunnable - null

This is because when the complete batch fails the original EDL request line is deleted, but not the associated ImportEntry (see attached image). Therefore when this ImportEntry is executed again by the ImportEntryManager it fails because it does not have any EDL related information.


[1] https://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration.examples [^]
No tags attached.
related to defect 0036615 new Triage Platform Base Error thrown when re-processing an EDL Request in asynchronous mode right after restarting tomcat 
related to defect 0048156 closed caristu Error when reprocessing EDL 
diff forceEDLError.diff (367) 2019-02-15 14:42
https://issues.openbravo.com/file_download.php?file_id=12662&type=bug
png orphanImportEntries.png (72,916) 2019-05-30 10:37
https://issues.openbravo.com/file_download.php?file_id=12997&type=bug
png
Issue History
2019-02-15 11:47caristuNew Issue
2019-02-15 11:47caristuAssigned To => platform
2019-02-15 11:47caristuIssue generated from0040214
2019-02-15 14:42caristuFile Added: forceEDLError.diff
2019-02-15 14:43caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18334#r18334
2019-03-28 10:56caristuRelationship addedrelated to 0036615
2019-05-30 09:14caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18844#r18844
2019-05-30 09:18caristuProposed Solution updated
2019-05-30 09:18caristuAssigned Toplatform => caristu
2019-05-30 10:35caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18845#r18845
2019-05-30 10:37caristuFile Added: orphanImportEntries.png
2019-05-30 13:34hgbotCheckin
2019-05-30 13:34hgbotNote Added: 0112267
2019-05-30 13:34hgbotStatusnew => resolved
2019-05-30 13:34hgbotResolutionopen => fixed
2019-05-30 13:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8c539d5ddeff0de7d5c093ccda6cd53c97eb199b [^]
2019-05-30 13:34caristuReview Assigned To => AugustoMauch
2019-05-30 13:49hgbotCheckin
2019-05-30 13:49hgbotNote Added: 0112268
2019-05-30 13:52hgbotCheckin
2019-05-30 13:52hgbotNote Added: 0112269
2019-06-11 10:39AugustoMauchNote Added: 0112568
2019-06-11 10:39AugustoMauchStatusresolved => closed
2021-11-25 10:58caristuRelationship addedrelated to 0048156

Notes
(0112267)
hgbot   
2019-05-30 13:34   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 8c539d5ddeff0de7d5c093ccda6cd53c97eb199b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 30 13:33:13 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8c539d5ddeff0de7d5c093ccda6cd53c97eb199b [^]

fixes bug 40215: Remove related import entry when request line is deleted

---
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---
(0112268)
hgbot   
2019-05-30 13:49   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 1462527e852069e4f3c9da5a139216dd01f727a5
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 30 13:48:41 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/1462527e852069e4f3c9da5a139216dd01f727a5 [^]

related to bug 40215: prevent NPE

  When trying to process import entries not related with any EDL request line, throw a controlled exception istead of a NPE

---
M src/org/openbravo/externaldata/integration/process/EDLImportEntryProcessor.java
---
(0112269)
hgbot   
2019-05-30 13:52   
Repository: erp/pmods/org.openbravo.externaldata.integration.examples
Changeset: 2319b3242ea47119540f8819d4c90d60ffd8ffa2
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 30 13:51:28 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration.examples/rev/2319b3242ea47119540f8819d4c90d60ffd8ffa2 [^]

related to bug 40215: assertion to ensure there aren't orphan import entries

---
M src-test/org/openbravo/externaldata/integration/examples/test/AddRequestTest.java
---
(0112568)
AugustoMauch   
2019-06-11 10:39   
Code reviewed and verified