[CONTROLLER-339] Conflicting Factories with the same name 'pcep-session-proposal-factory-stateful02' being found. Created: 18/Apr/14  Updated: 25/Jul/23  Resolved: 22/Apr/14

Status: Resolved
Project: controller
Component/s: config
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jamie Goodyear Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


External issue ID: 777

 Description   

BundleContextBackedModuleFactoriesResolver getAllFactories will find two conflicting factories with the name 'pcep-session-proposal-factory-stateful02'.

I detected this on a copy of the ServiceProvider distribution 0.1.2-SNAPSHOT. My application does not export a copy of this factory into the environment. Any suggestions on tracking down the source of the second factory in the controller environment - there should only be one.

osgi> 2014-04-18 14:43:46.323 NDT [config-pusher] ERROR o.o.c.c.m.i.o.BundleContextBackedModuleFactoriesResolver - Module name is not unique. Found two conflicting factories with same name 'pcep-session-proposal-factory-stateful02': 'org.opendaylight.controller.config.yang.pcep.stateful02.cfg.Stateful02PCEPSessionProposalFactoryModuleFactory@304473a2' 'org.opendaylight.controller.config.yang.pcep.stateful02.cfg.Stateful02PCEPSessionProposalFactoryModuleFactory@6e4ca3b3'


 Comments   
Comment by Jamie Goodyear [ 18/Apr/14 ]

I'm working on a set of steps to reproduce that will not require my application (too many extraneous bits). I'll update this bug report when I have the steps available.

Comment by Jamie Goodyear [ 22/Apr/14 ]

Further investigation note:

When two instances of org.opendaylight.bgpcep.pcep-ietf-stateful02 are found, the OSGi webconsole only reports the one instance::

Service 380 - [org.opendaylight.protocol.pcep.PCEPSessionProposalFactory] (pid: n/a)
from Bundle 91 - org.opendaylight.bgpcep.pcep-ietf-stateful02 (org.opendaylight.bgpcep.pcep-ietf-stateful02), version 0.3.1.SNAPSHOT
instanceName: stateful02-prop
implementationName: pcep-session-proposal-factory-stateful02

Comment by Jamie Goodyear [ 22/Apr/14 ]

The error appeared to have been caused by not setting its dependency on pcep-ietf-stateful02 to provided. When its not set to provided a second instance will be created, causing the problem.

<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>pcep-ietf-stateful02</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

Comment by Jamie Goodyear [ 22/Apr/14 ]

I've marked this issue as resolved invalid as we can work around the issue by marking the dependency as provided in the container.

We will note however, that the module name is hardcoded as such multiple copies can not exist - Not sure if this would be considered a bug or not.

Generated at Wed Feb 07 19:52:47 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.