Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0058306
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] External Data Integrationmajorhave not tried2025-03-21 10:112025-03-24 10:22
ReporteralostaleView Statuspublic 
Assigned Tocaristu 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Statusapproved
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Support ticket
OBNetwork customerGold
Regression introduced in release
Summary

0058306: 25Q1 backport - NonUniqueObjectException thrown in EDL non blocking processes under some circumstances

DescriptionWhen executing non blocking EDL processes, there is a random failure that may happen at the beginning of the "non blocking" execution:

2025-03-19 15:23:53,653 [NonBlocking - 0] ERROR org.openbravo.externaldata.integration.process.ProcessRequest - Unhandled exception processing request line
org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [OBEDL_Process#17B50CF4701240868D03BDF047F9B1F3]
    at org.hibernate.engine.internal.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:700) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
Steps To Reproduce1) Apply the provided patch which forces an scenario to reproduce the error by not cleaning the SessionHandler in the non-blocking thread
2) Trigger a Push API event
3) Trigger again another Push API event, the error will be thrown
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0058301 closedcaristu NonUniqueObjectException thrown in EDL non blocking processes under some circumstances 

-  Notes
(0177152)
hgbot (developer)
2025-03-24 08:32

Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/50 [^]
(0177165)
hgbot (developer)
2025-03-24 10:22

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.externaldata.integration [^]
Changeset: 621267de2c8ca0c9b6faed8a32e50c07788008db
Author: Carlos Aristu <c.aristu@orisha.com>
Date: 24-03-2025 08:34:35
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.externaldata.integration/-/commit/621267de2c8ca0c9b6faed8a32e50c07788008db [^]

fixes ISSUE-58306: SessionHandler is leaked in non-blocking threads

  A NonUniqueObjectException exception was being thrown sometimes when
the line and its linked objects are re-attached into the session of the
non-blocking thread in the nonBlockingEDLCompleted method.

  Although we have not been able to find a real scenario to force the
problem yet, this error indicates that non-blocking threads may be
leaking the SessionHandler thread local.

  So, to try to avoid this problem, now when we start the execution of
the non blocking part we close the SessionHandler to ensure that we
continue with a fresh new session, instead of using a leaked one.

---
M src-test/org/openbravo/externaldata/integration/process/AsynchronousProcessorTest.java
M src/org/openbravo/externaldata/integration/process/AsynchronousProcessor.java
M src/org/openbravo/externaldata/integration/process/ItemProcessor.java
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---
(0177166)
hgbot (developer)
2025-03-24 10:22

Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/50 [^]

- Issue History
Date Modified Username Field Change
2025-03-21 10:11 alostale New Issue
2025-03-21 10:11 alostale Assigned To => caristu
2025-03-21 10:11 alostale OBNetwork customer => Gold
2025-03-21 10:11 alostale Issue generated from 0058301
2025-03-21 10:11 alostale Relationship added blocks 0058301
2025-03-24 08:32 hgbot Merge Request Status => open
2025-03-24 08:32 hgbot Note Added: 0177152
2025-03-24 10:21 hgbot Merge Request Status open => approved
2025-03-24 10:22 hgbot Resolution open => fixed
2025-03-24 10:22 hgbot Status new => closed
2025-03-24 10:22 hgbot Note Added: 0177165
2025-03-24 10:22 hgbot Note Added: 0177166


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker