Ugh… I knew it was something silly, didn’t think it was THAT silly. Thanks for pointing that out.
The pom.xml defined a Private-Package bundle header which caused all project classes (…) to be included and then bnd automatically generated the component descriptors. Problem solved. Thanks again for your help. Erwin > On Jan 18, 2018, at 19:53, Neil Bartlett <njbartl...@gmail.com> wrote: > > The scr:list output shows they are published by two separate bundle IDs, 112 > and 137. Check whether you have accidentally built the component class into > both bundles. > > Neil > > On 18 Jan 2018 11:45 pm, "Erwin Hogeweg via osgi-dev" <osgi-dev@mail.osgi.org > <mailto:osgi-dev@mail.osgi.org>> wrote: > Hi, > > I have a very simple component, with only one method, which is referenced in > only one other component. For some reason though, the OSGi framework decides > that the component needs to be instantiated and registered twice. I have put > breakpoints in the constructor and in both cases the entire stack is > framework code. > > If I add the immediate=true property to the component definition both > components are actually active, if I leave out the immediate=true one > component is active the other satisfied. > > This is my simple component def. > @Component(name=“my.component", > configurationPolicy=ConfigurationPolicy.REQUIRE, > service=MyService.class) > > src:list shows them both. > [ 112] my.component enabled > [ 31] [active ] my.component > ... > [ 137] my.component enabled > [ 32] [satisfied ] my.component > > > We are using a std equinox/felix OSGi stack. > 0 ACTIVE org.eclipse.osgi_3.10.2.v20150203-1939 > Fragments=5 > 1 ACTIVE org.apache.felix.gogo.command_0.16.0 > 2 ACTIVE org.apache.felix.gogo.runtime_0.16.2 > 3 ACTIVE org.apache.felix.gogo.shell_0.12.0 > 4 ACTIVE org.eclipse.equinox.console_1.0.100.v20130429-0953 > 5 RESOLVED org.eclipse.osgi.compatibility.state_1.0.100.v20150402-1551 > Master=0 > 6 ACTIVE org.ops4j.pax.logging.pax-logging-api_1.8.5 > 7 ACTIVE org.ops4j.pax.logging.pax-logging-service_1.8.5 > 8 ACTIVE org.apache.felix.eventadmin_1.4.6 > 9 ACTIVE org.apache.felix.scr_2.0.8 > 10 ACTIVE org.apache.felix.configadmin_1.8.14 > 11 ACTIVE org.apache.felix.fileinstall_3.5.4 > ... > > I am sure I am overlooking something, but at this moment I am lost. I’ll keep > plugging away, but any suggestions on why this component might be created > twice (and how to resolve) would be greatly appreciated. > > > Kind Regards, > > Erwin > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org> > https://mail.osgi.org/mailman/listinfo/osgi-dev > <https://mail.osgi.org/mailman/listinfo/osgi-dev> >
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev