`
slippy
  • 浏览: 33770 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

[SCR] Found components with duplicated names inside their bundle!

阅读更多
Today I was briefly confused by an error message issued by the OSGi Equinox runtime’s Declarative Services runtime which I did not understand immediately. For your – and my own – reference find the solution here.
First, this was the error message I got:

1281104579615=1::[SCR] Found components with duplicated names inside their bundle!
This component will not be processed: Component[
    name = networksimulation
    factory = null
    autoenable = true
    immediate = true
    implementation = com.danielschneller.sim.network.NetworkStateSimulation
    properties = {devicevendor=DanielSchneller, simulation=true}
    serviceFactory = false
    serviceInterface = [com.danielschneller.network.NetworkState]
    references = {
        Reference[name = LOG, interface = org.osgi.service.log.LogService,
        policy = static, cardinality = 0..1, target = null, bind = null, unbind = null]
    }
    located in bundle = com.danielschneller.sim.network_1.1.0.qualifier [49]
]

Apparently the component name networksimulation was used by two components in the same bundle. Well, that’s why you are encouraged to use package-name like identifiers; however this was not the problem. Changing it to com.danielschneller.sim.net.simulation which was guaranteed to be unique in my case still left the error the same:

1281104579615=1::[SCR] Found components with duplicated names inside their bundle!
This component will not be processed: Component[
    name = com.danielschneller.sim.net.simulation
    factory = null
    ...

To make it short, this is what happened: I had added this component’s description to a bundle that already contained some more using the Eclipse wizard for new service components.
That very fine wizard dutifully added the new filename to the Manifest is the Service-Component: line. Unfortunately in this case it led to:

Service-Component: OSGI-INF/*.xml, networksimulation.xml

At launch time apparently the wildcard was expanded, already including the new file, and then added at the end again. Apparently there is no sanitizing done (like adding the filenames to a Set instead of a List), which results in a second attempt of registering the same component a second time. I will go and file a bug with Eclipse for this, There already is a filed, but unfixed bug for this (Eclipse Bug #278540) but till then just make sure that when you use wildcards in the Service-Component Manifest header it does not cause any duplicates.
分享到:
评论

相关推荐

    ffmpeg 合并文件异常.txt

    https://stackoverflow.com/questions/44374790/ffmpeg-concat-protocol-error-found-duplicated-moov-atom-skipped-it https://stackoverflow.com/questions/42859528/merge-video-with-ffmpeg ffmpeg -y -i ...

    Structured Spark Streaming-as-a-Service with Hopsworks

    ### Structured Spark Streaming as a Service with Hopsworks Structured Spark Streaming as a Service with Hopsworks is a powerful and flexible solution designed to simplify the process of building real...

    duplicated.zip

    "duplicated.zip"这个文件名暗示我们这里涉及的数据处理操作是关于去除重复项的。"根据某一列对数据进行去重"这一描述直接点明了具体的操作,即我们需要在数据集中依据某特定列的值来识别并移除重复的行。在这个场景...

    find duplicated files

    "find duplicated files"的主题涉及到计算机文件系统管理、数据优化和存储效率提升。以下是一些关于如何查找和处理重复文件的重要知识点: 1. **重复文件的定义**:在计算机中,重复文件是指具有相同内容但文件名...

    ICS delphixe10源码版

    would not be in their proper subdirectories. Please note most of these directories are differently named to ICS V7 and earlier, to ease support of multiple versions of Delphi and platforms, and to ...

    The.Enigma.Protector.x32.v4.30_DEMO_Modified_Crack

    - Virtual Box: Fixed problem packaging feature is duplicated files are found - Virtual Box: Bug fixed, Command Line options were not read in packages - Virtual Box: Fixed problem with CreateProcess ...

    The.Enigma.Protector.x64.v4.30_DEMO_Modified_Crack

    - Virtual Box: Fixed problem packaging feature is duplicated files are found - Virtual Box: Bug fixed, Command Line options were not read in packages - Virtual Box: Fixed problem with CreateProcess ...

    I2Localization2.8.6_f2

    Unity UI, Unity 2D, TextMesh Pro, NGUI, 2D ToolKit, SVG Importer, Standard Components Localizes Image, Text, Sounds, Fonts, Sprites, Atlases, Prefabs, TextMeshes, Dropdowns and more. Auto ...

    I2 Localization2.6.6b1

    Unity UI, Unity 2D, TextMesh Pro, NGUI, 2D ToolKit, SVG Importer, Standard Components Localizes Image, Text, Sounds, Fonts, Sprites, Atlases, Prefabs, TextMeshes, Dropdowns and more. Auto ...

    FFmepg移植到iOS后需要调用ffmpeg命令所需的ffmeg.c文件

    编译ffmpeg后,得到了include和lib库,但是想用ffmpeg命令(就像在终端那样),就需要我的这个ffmpegh里面的文件,添加到xcode项目,然后直接通过ffmpeg_main就可以调用,跟命令行一样。 具体可以看文章:...

    Learning [removed] JavaScript programming Vol 1: The language core

    In this »training in a book« you will develop parts of a webshop, mix cocktails with arrays, create background images with recursion and fight the »dark side of JavaScript«. You won’t need any ...

    FastReport VCL 6.6.12 Enterprise Full Source.rar

    + Added TfrxPostProcessor.ResetDuplicates - can reset duplicated from script + Added DrillState property to rtti (check how to use in 151.fr3 report) - [Lazarus] Fixed Map object de-serialization of ...

    FastReport VCL 6.6.11 Enterprise Installer.rar

    + Added TfrxPostProcessor.ResetDuplicates - can reset duplicated from script + Added DrillState property to rtti (check how to use in 151.fr3 report) - [Lazarus] Fixed Map object de-serialization of ...

    FastReport_6.6.15_VCL_Enterprise_Sources.rar

    + Added TfrxPostProcessor.ResetDuplicates - can reset duplicated from script + Added DrillState property to rtti (check how to use in 151.fr3 report) - [Lazarus] Fixed Map object de-serialization of ...

    单片机取字软件

    单片机取字模软件 No part of this material may be reproduces or duplicated in any form...All other product names mentioned herein are trademarks and/or registered trademarks of their respective companies.

    Manual - User PB560 - English.pdf

    COVIDIEN, COVIDIEN with logo, and the Covidien logo and Positive Results for Life are U.S. and inter- nationally registered trademarks of Covidien AG. ™* brands are trademarks of their respective ...

    postcss-combine-duplicated-selectors:自动使CSS选择器保持唯一

    Postcss合并重复的选择器 自动检测并合并重复CSS选择器,因此您不必 :grinning_face_with_smiling_eyes:用法要求为了使用此功能,您将需要安装 。 根据是否要使用CLI,需要安装 。 npm install --save-dev postcss ...

    重构-改善既有代码的设计+中文版

     Duplicated Code 重复代码   Long Method 过长方法   Large Class 过长类   Long Parameter List 过长参数列表   Divergent Change 发散式变化   Shotgun Surgery 霰弹式修改   Feature Envy 特性依恋...

    重构——改善既有代码的设计

     Duplicated Code 重复代码   Long Method 过长方法   Large Class 过长类   Long Parameter List 过长参数列表   Divergent Change 发散式变化   Shotgun Surgery 霰弹式修改   Feature Envy 特性依恋...

    重构-改善既有代码的设计(中文版)

     Duplicated Code 重复代码   Long Method 过长方法   Large Class 过长类   Long Parameter List 过长参数列表   Divergent Change 发散式变化   Shotgun Surgery 霰弹式修改   Feature Envy 特性依恋...

Global site tag (gtag.js) - Google Analytics