Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0053742Openbravo ERPA. Platformpublic2023-10-23 20:482023-10-27 11:44
cberner 
cberner 
normalmajorhave not tried
closedfixed 
5
 
 
AugustoMauch
Core
Production - QA Approved
2023-06-14
PR23Q3
https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/commit/3814f42dd715096570c6d519a63e77fb9ebb2738 [^]
No
0053742: NullPointerException thrown in EDL in unhandled exception cases
A NullPointerException is thrown when an exception is not properly handled by the EDL infrastructure.

This is due to a block where we have an CompletableFuture#exceptionally call, it should properly return an error object instead of null: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/blob/master/src/org/openbravo/externaldata/integration/process/ProcessRequest.java#L607 [^]
## These steps are not complete, they require some addition, to be done
1. Setup an EDL Process to be launched, like for example Push API
2. Add an exception at the end of nonBlockingEDLCompleted function:
  2.1. To add just before this return line: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/blob/master/src/org/openbravo/externaldata/integration/process/ProcessRequest.java#L702 [^]
    if (1 == 1) {
      throw new OBException("ERROR");
    }
3. Execute what is required for the EDL to be launched.

Check that a NullPointerException is thrown just at this line: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/blob/master/src/org/openbravo/externaldata/integration/process/EDLImportEntryProcessor.java#L206 [^]
Return a proper JSONObject error instead of null in this exceptionally block: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/blob/master/src/org/openbravo/externaldata/integration/process/ProcessRequest.java#L607 [^]
No tags attached.
depends on backport 0053750PR23Q4 closed cberner NullPointerException thrown in EDL in unhandled exception cases 
caused by feature request 0052614 closed cberner There should be a mechanism to have non-blocking async EDL Requests 
Issue History
2023-10-23 20:48cbernerNew Issue
2023-10-23 20:48cbernerAssigned To => Triage Platform Base
2023-10-23 20:48cbernerModules => Core
2023-10-23 20:48cbernerRegression level => Production - QA Approved
2023-10-23 20:48cbernerRegression date => 2023-06-14
2023-10-23 20:48cbernerRegression introduced in release => PR23Q3
2023-10-23 20:48cbernerRegression introduced by commit => https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/commit/3814f42dd715096570c6d519a63e77fb9ebb2738 [^]
2023-10-23 20:48cbernerTriggers an Emergency Pack => No
2023-10-23 20:48cbernerAssigned ToTriage Platform Base => cberner
2023-10-23 20:48cbernerStatusnew => acknowledged
2023-10-23 20:50hgbotNote Added: 0156213
2023-10-24 16:14cbernerRelationship addedcaused by 0052614
2023-10-24 16:27hgbotResolutionopen => fixed
2023-10-24 16:27hgbotStatusacknowledged => closed
2023-10-24 16:27hgbotNote Added: 0156237
2023-10-24 16:27hgbotNote Added: 0156238
2023-10-24 16:41cbernerStatusclosed => new
2023-10-24 16:41cbernerResolutionfixed => open
2023-10-24 16:41cbernerStatusnew => scheduled
2023-10-24 16:42cbernerStatusscheduled => resolved
2023-10-24 16:42cbernerFixed in SCM revision => 8c6a5c8c55b2de0f68e237dcb2e758b5f00154aa
2023-10-24 16:42cbernerResolutionopen => fixed
2023-10-24 16:42cbernerReview Assigned To => AugustoMauch
2023-10-24 16:42cbernerStatusresolved => closed
2023-10-27 11:44ivancaceresIssue Monitored: ivancaceres

Notes
(0156213)
hgbot   
2023-10-23 20:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/30 [^]
(0156237)
hgbot   
2023-10-24 16:27   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration [^]
Changeset: 8c6a5c8c55b2de0f68e237dcb2e758b5f00154aa
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 23-10-2023 20:49:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/commit/8c6a5c8c55b2de0f68e237dcb2e758b5f00154aa [^]

Fixes ISSUE-53742: NullPointerException thrown in EDL on unhandled exception cases

A NullPointerException was thrown due to missing returning an error
object in the exceptionally block of a CompletableFuture.

---
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---
(0156238)
hgbot   
2023-10-24 16:27   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/30 [^]