-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Duplicate
-
Affects Version/s: 5.1.4
-
Fix Version/s: None
-
Component/s: Runtime
A workaround has been set to avoid spurious "Duplicate component name" errors:
commit 356eeedd10ea0e153ca7b6b938a68e934c89d66a Author: Florent Guillaume <fg@nuxeo.com> Date: Sat Apr 12 23:53:27 2008 +0200 hide the fact that nuxeo-runtime bundles are registered twice @@ -143,6 +143,12 @@ public class ComponentManagerImpl implements ComponentManager { public final void _register(RegistrationInfoImpl ri) { ComponentName name = ri.getName(); if (isRegistered(name)) { + if (name.getName().startsWith("org.nuxeo.runtime.")) { + // XXX we hide the fact that nuxeo-runtime bundles are + // registered twice + // TODO fix the root cause and remove this + return; + } String msg = "Duplicate component name: '" + name + "'"; log.error(msg); Framework.getRuntime().getWarnings().add(msg);
This double registration appears on blacklisted nuxeo-runtime components: WARN [localhost-startStop-1] [org.nuxeo.runtime.model.impl.ComponentManagerImpl] Component org.nuxeo.runtime.trackers.files.threadstracking.config was blacklisted. Ignoring. is logged twice.
The root cause is still present:
- update the TODO with the current issue reference
- add a debug log
- maybe accept only two registrations: the current code hides all duplicates on org.nuxeo.runtime.* components
- blacklist and aliases are not properly managed regarding that issue
ComponentName name = ri.getName(); if (blacklist.contains(name.getName())) { log.warn("Component " + name.getName() + " was blacklisted. Ignoring."); return; } if (reg.contains(name)) { if (name.getName().startsWith("org.nuxeo.runtime.")) { // XXX we hide the fact that nuxeo-runtime bundles are // registered twice // TODO fix the root cause and remove this return; } handleError("Duplicate component name: " + name, null); return; } for (ComponentName n : ri.getAliases()) { if (reg.contains(n)) { handleError("Duplicate component name: " + n + " (alias for " + name + ")", null); return; } }
- depends on
-
NXP-3974 Create an all in one jar packaging for nxshell + webengine jetty + nuxeo-ep jetty
- Resolved
-
NXP-8875 Allow runtime component name aliasing
- Resolved
-
NXP-1690 log component with duplicated names in the runtime warning summary
- Resolved
- duplicates
-
NXP-29504 Fix Nuxeo startup logging of duplicate components
- Resolved