felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Sauthier (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-2325) SCR says that my component is registered twice
Date Wed, 05 May 2010 15:03:02 GMT
SCR says that my component is registered twice
----------------------------------------------

                 Key: FELIX-2325
                 URL: https://issues.apache.org/jira/browse/FELIX-2325
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services (SCR)
    Affects Versions:  scr-1.4.0
            Reporter: Guillaume Sauthier


I've got the following exception when SCR starts my component:

2010-05-05 15:00:58,389 : LoggerService.log : [org.ow2.easybeans.proxy.factory.RemoteCallFactory]
Cannot register Component
org.osgi.service.component.ComponentException: The component name 'org.ow2.easybeans.proxy.factory.RemoteCallFactory'
has already been registered.
	at org.apache.felix.scr.impl.ComponentRegistry.registerComponent(ComponentRegistry.java:291)
	at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:247)
	at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)

My XML declaration files is the following:
<component xmlns="http://www.osgi.org/xmlns/scr/v1.1.0">



  <implementation class="org.ow2.easybeans.proxy.factory.RemoteCallFactory" />



  <service>

    <provide interface="javax.naming.spi.ObjectFactory" />

    <provide interface="org.ow2.easybeans.proxy.factory.RemoteCallFactory" />

  </service>



</component>

As you can see, there is no 'name' attribute (The spec says that by default the implementation
classname is used).
I'm sure that the component is not present in 2 bundles, so the default name should be unique.

As a workaround, if I set the 'name' attribute, everything works well, but as the XML schema
(and the spec) says that it is optional, I think that SCR should support that use case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message