Details
-
Type:
Bug
-
Status:
Ready for QA
(View Workflow)
-
Priority:
Urgent
-
Resolution: Unresolved
-
Component/s: FN
-
Labels:None Labels
-
Customer:OMAN-Tel
Description
getAllPendingTasks is failed on OLD FN .80
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://server.api.nep.mobinets.com/">
<soapenv:Header/>
<soapenv:Body>
<ser:getAllPendingTasks/>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Error while loading Tasks No enum constant com.mobinets.nep.fn.model.nep.persist.enums.FnWoTaskStatus.Completed; nested exception is java.lang.IllegalArgumentException: No enum constant com.mobinets.nep.fn.model.nep.persist.enums.FnWoTaskStatus.Completed</faultstring>
<detail>
<ns1:NepFault xmlns:ns1="http://server.api.nep.mobinets.com/">
<errorCode xsi:type="xs:int" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://server.api.nep.mobinets.com/">1</errorCode>
</ns1:NepFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Activity
| Field | Original Value | New Value |
|---|---|---|
| Gantt Options | Milestone (set to milestone: having a due date but zero effort) | |
| Planned Start | 2026-02-23 24:00 (milestone: set planned start date to due date) | |
| Planned End | 2026-02-23 24:00 (milestone: set planned end date to due date) |
| Assignee | Hassan Abdine [ habdine ] | Zein Trabelsi [ ztrabelsi ] |
| Status | Open Bug [ 10108 ] | Dev Scheduled [ 10014 ] |
| Status | Dev Scheduled [ 10014 ] | Implementation in progress [ 10016 ] |
| Assignee | Zein Trabelsi [ ztrabelsi ] | Ayed Bada [ abada ] |
| Status | Implementation in progress [ 10016 ] | To Be Released [ 10400 ] |
| Remaining Estimate | 0 minutes [ 0 ] | |
| Time Spent | 4 hours [ 14400 ] | |
| Worklog Id | 292732 [ 292732 ] |
| Baseline Start | 2026-02-23 24:00 (set baseline based of initial work logging) | |
| Baseline End | 2026-02-23 24:00 (set baseline based of initial work logging) |
| Status | To Be Released [ 10400 ] | Ready for QA [ 10023 ] |
| Assignee | Ayed Bada [ abada ] | Mbaye Lo [ mbayel ] |
| Time Spent | 4 hours [ 14400 ] | 1 day [ 28800 ] |
| Worklog Id | 293712 [ 293712 ] |
| Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
|---|---|---|---|---|---|---|---|---|---|
|
23h 5m | 1 | Zein Trabelsi | 25/Feb/26 10:58 AM | |||||
|
5s | 1 | Zein Trabelsi | 25/Feb/26 10:58 AM | |||||
|
1d 1h 14m | 1 | Ayed Bada | 26/Feb/26 12:13 PM | |||||
|
25m 4s | 1 | Khaled Khalil | 26/Feb/26 12:38 PM |
|
Links Hierarchy |
Documentation
|
Documentation
During the investigation of the NullPointerException occurring in the getAllPendingTasks API, we identified that the issue was caused by inconsistent data in the database.
Root Cause :
Some records in FN_WO_TASK were linked to work orders whose subscriber_id referenced subscribers that do not exist in the FN_SUBSCRIBER table.
This situation likely occurred due to a manual deletion of subscriber records directly from the database without cleaning or updating the related records in FN_WORK_ORDER and FN_WO_TASK, resulting in orphaned references.
Resolution Applied
We identified and removed the affected tasks whose work orders referenced non-existent subscribers.
Verification Query :
SELECT t.id AS task_id, t.task_name, w.id AS wo_id, w.subscriber_id
FROM FN_WO_TASK t
JOIN FN_WORK_ORDER w ON t.wo_id = w.id
LEFT JOIN SUBSCRIBER s ON w.subscriber_id = s.id
WHERE w.subscriber_id IS NOT NULL
AND s.id IS NULL;
Cleanup Query Executed
DELETE FROM FN_WO_TASK
WHERE wo_id IN (
SELECT w.id
FROM FN_WORK_ORDER w
LEFT JOIN SUBSCRIBER s ON w.subscriber_id = s.id
WHERE w.subscriber_id IS NOT NULL
AND s.id IS NULL
);
Optionally, orphaned work orders can also be removed:
DELETE FROM FN_WORK_ORDER
WHERE subscriber_id IS NOT NULL
AND subscriber_id NOT IN (SELECT id FROM SUBSCRIBER);