You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira) via notifications" <no...@ofbiz.apache.org> on 2026/10/31 14:09:00 UTC

[jira] [Closed] (OFBIZ-13780) DispatchContext without a dispatcher caches an empty service map

     [ https://issues.apache.org/jira/browse/OFBIZ-13780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Pathak closed OFBIZ-13780.
---------------------------------
    Fix Version/s: Upcoming Branch
                   24.09.09
       Resolution: Fixed

> DispatchContext without a dispatcher caches an empty service map
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-13780
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13780
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/service
>    Affects Versions: Upcoming Branch, 24.09.08
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>             Fix For: Upcoming Branch, 24.09.09
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> A {{DispatchContext}} created with a null dispatcher, as webtools {{LabelReferences}} and {{ArtifactInfoFactory}} do, loads the service definitions in tasks that each call {{getDelegator()}}, which dereferences the null dispatcher. Every task fails with a {{NullPointerException}}, {{ExecutionPool.getAllFutures}} logs and skips the failures, and the resulting empty map is cached under the entity model reader name (usually {{main}}).
> h3. Impact
> At startup the cache is already filled by the real dispatchers, so the problem stays hidden. After "Clear all caches" in webtools, if Artifact Info or the Label Manager is the first to load the service definitions, every dispatcher using that entity model reader fails with "Cannot locate service" until the caches are cleared again.
> h3. Fix
> Without a dispatcher, use the delegator configured for the named entity model reader to read the service definitions, and reject a name that no delegator uses instead of caching an empty map.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)