Hello,

In addition to my "Invalid BundleContext" sporadic issue during unit tests,
I'm also getting this even stranger one:

ERROR: com.company.product.desktop (2): [editor.lint] Cannot register
Component
org.osgi.service.component.ComponentException: The component name
'editor.lint' has already been registered.
at
org.apache.felix.scr.impl.ComponentRegistry.checkComponentName(ComponentRegistry.java:141)
at
org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:165)
at
org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:110)
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:227)
at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:173)
at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:690)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:619)
at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:532)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3601)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1616)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1544)
at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1125)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
at java.lang.Thread.run(Unknown Source)

Things I've checked: I'm only starting Felix once. The XML file that
contains the "editor.lint" service is listed once in the Manifest:

Service-Component: com/company/product/editor/plugins/lint/plugin.xml,
com/company/product/editor/plugins/difftool/plugin.xml,
com/company/product/editor/plugins/sourcecontrol/plugin.xml,
com/company/product/editor/codepad/plugin.xml,
com/company/product/editor/editor_menus.xml

The lint/plugin.xml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<component name="editor.lint" immediate="true">
  <implementation
class="com.company.product.editor.plugins.lint.LintMenuContributionFactory"
/>
  <service>
    <provide
interface="com.company.product.api.menus.MenuContributionFactory" />
  </service>
</component>

And I've double-checked that no other service is called "editor.lint". Any
ideas how this could occur? Looking at the source of
BundleComponentActivator.java, it certainly appears that something simply is
registering this same component twice.

Thanks,
Jared
-- 
View this message in context: 
http://www.nabble.com/SCR-component-already-registered-tp19512963p19512963.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to