Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0057008Openbravo ERPZ. Otherspublic2024-11-06 10:512024-11-28 13:59
inaki_azkonobieta 
Triage Platform Base 
highminoralways
feedbackopen 
5
main 
 
Core
No
0057008: Wrong insert happening in some environments
Every 5 minutes we have the following error in the log:
2024-11-06 10:02:07,008 [DefaultQuartzScheduler_Worker-3] ERROR org.openbravo.scheduling.ProcessRunData - SQL error in query: INSERT INTO AD_Process_Run (AD_Org_ID, AD_Client_ID, Isactive, Created, Createdby, Updated, UpdatedBy, AD_Process_Run_ID, Status, Start_Time, Runtime, Log, AD_Process_Request_ID, Scheduler_Instance) VALUES (?, ?, 'Y', NOW(), ?, NOW(), ?, ?, ?, NOW(), ?, ?, ?, ?) :org.postgresql.util.PSQLException: ERROR: insert or update on table "ad_process_run" violates foreign key constraint "ad_process_run_ad_client"
  Detail: Key (ad_client_id)=(4028E6C72959682B01295A070852010D) is not present in table "ad_client".
2024-11-06 10:02:07,008 [DefaultQuartzScheduler_Worker-3] ERROR org.openbravo.scheduling.ProcessMonitor - @CODE=0@ERROR: insert or update on table "ad_process_run" violates foreign key constraint "ad_process_run_ad_client"
  Detail: Key (ad_client_id)=(4028E6C72959682B01295A070852010D) is not present in table "ad_client".
javax.servlet.ServletException: @CODE=0@ERROR: insert or update on table "ad_process_run" violates foreign key constraint "ad_process_run_ad_client"
  Detail: Key (ad_client_id)=(4028E6C72959682B01295A070852010D) is not present in table "ad_client".
    at org.openbravo.scheduling.ProcessRunData.insert(ProcessRunData.java:112) ~[classes/:?]
    at org.openbravo.scheduling.ProcessMonitor.jobToBeExecuted(ProcessMonitor.java:139) [classes/:?]
    at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1927) [quartz-2.3.2.jar:?]
    at org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:324) [quartz-2.3.2.jar:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:173) [quartz-2.3.2.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:?]
2024-11-06 10:02:07,008 [DefaultQuartzScheduler_Worker-3] ERROR org.openbravo.scheduling.DefaultJob - Error executing process org.openbravo.erpCommon.ad_process.AcctServerProcess
java.lang.NullPointerException: null
2024-11-06 10:02:07,008 [DefaultQuartzScheduler_Worker-3] INFO org.quartz.core.JobRunShell - Job OB_QUARTZ_GROUP.3CD8A7A68DFE4FDAAD20D2570D78DE3B threw a JobExecutionException:
org.quartz.JobExecutionException: java.lang.NullPointerException
    at org.openbravo.scheduling.DefaultJob.execute(DefaultJob.java:72) ~[classes/:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:?]
Caused by: java.lang.NullPointerException
2024-11-06 10:02:07,013 [DefaultQuartzScheduler_Worker-3] ERROR org.openbravo.dal.core.OBContext - The query 'select r from ADRole r where r.id=:roleId' returned 0 results while only 1 result was expected
2024-11-06 10:02:07,013 [DefaultQuartzScheduler_Worker-3] ERROR org.openbravo.scheduling.ProcessMonitor - null
java.lang.NullPointerException: null


SOlutions tried that didn't work:
 - Redeployed the instance for checking that there is not a problem of the context
- No records in the ad_process_request has this ad_client_id in his record
- No records in the ad_process_request have this ad_client_id in the context
select * from ad_process_request where ob_context like '%4028E6C72959682B01295A070852010D%';

The client is related to the QA Testing and the process launched is org.openbravo.erpCommon.ad_process.AcctServerProcess
Automatically after deleting the client
No tags attached.
Issue History
2024-11-06 10:51inaki_azkonobietaNew Issue
2024-11-06 10:51inaki_azkonobietaAssigned To => Triage Omni OMS
2024-11-06 10:51inaki_azkonobietaModules => Core
2024-11-06 10:51inaki_azkonobietaTriggers an Emergency Pack => No
2024-11-06 10:51inaki_azkonobietaAssigned ToTriage Omni OMS => Triage Platform Base
2024-11-06 10:52javietxeIssue Monitored: javietxe
2024-11-10 22:55AugustoMauchNote Added: 0171732
2024-11-10 22:55AugustoMauchStatusnew => feedback
2024-11-28 13:59alostaleNote Added: 0172721
2024-11-28 13:59alostaleSeveritymajor => minor

Notes
(0171732)
AugustoMauch   
2024-11-10 22:55   
IƱaki, can you elaborate the steps to reproduce, please?
(0172721)
alostale   
2024-11-28 13:59   
Lowering severity to minor as it doesn't have other known impact than error messages in logs.