You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Cristiano Gavião <cv...@gmail.com> on 2014/03/21 16:14:44 UTC

Strange error with org.apache.felix.configadmin-1.8.0

Hi,

I've created a itest to verify the behaviour of a extender bundle that uses
CM inside Felix and Equinox.

In Equinox everything is ok. But in Felix in getting this strange error:

ERROR: Bundle org.jbehave.osgi.core [32] EventDispatcher: Error during
dispatch. (java.lang.IllegalArgumentException: Collection must not be empty)
java.lang.IllegalArgumentException: Collection must not be empty
    at
org.apache.felix.cm.impl.CaseInsensitiveDictionary.checkValue(CaseInsensitiveDictionary.java:304)
    at
org.apache.felix.cm.impl.CaseInsensitiveDictionary.<init>(CaseInsensitiveDictionary.java:85)
    at
org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:373)
    at
org.apache.felix.cm.impl.ConfigurationAdapter.update(ConfigurationAdapter.java:131)
    at
org.jbehave.osgi.core.components.AbstractExtenderComponent.createFactoryConfigurationForExtendeeWithOneItem(AbstractExtenderComponent.java:174)
    at
org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.registerStoryRunnerService(StoryRunnerServiceExtenderComponent.java:136)
    at
org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.processEmbedderManifestHeaderClass(StoryRunnerServiceExtenderComponent.java:120)
    at
org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.onExtensionAddition(StoryRunnerServiceExtenderComponent.java:54)
    at
org.jbehave.osgi.core.components.DefaultExtensionTracker.addingBundle(DefaultExtensionTracker.java:46)
    at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)
    at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)
    at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
    at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
    at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)
    at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)
    at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)
    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
    at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
    at java.lang.Thread.run(Thread.java:744)

there is no way I

the interesting thing is that

Re: Strange error with org.apache.felix.configadmin-1.8.0

Posted by Cristiano Gavião <cv...@gmail.com>.
Hi Felix,

many thanks for your feedback. I changed the code to avoid the properties
with empty collections and it is working now.

anyway I will question about that in the OSGi list.

best regards,

Cristiano


2014-03-22 2:58 GMT-03:00 Felix Meschberger <fm...@adobe.com>:

> Hi Cristiano
>
> It is not the Properties object itself that is empty but one of the
> entries has its value being an empty collection.
>
> Now, it is a good question, whether empty collections should actually be
> allowed in the properties or not.
>
> Regards
> Felix
>
> Am 21.03.2014 um 09:18 schrieb Cristiano Gavião <cv...@gmail.com>:
>
> > sorry, I push enter key before end the email... :(
> >
> > continuing..
> >
> > there is no way I could pass a empty property to CM because I'm checking
> > this in code:
> >
> >        if (properties.isEmpty()){
> >            System.err.println("Could not build a Embedder for " +
> > extendeeBundle);
> >            return;
> >        }
> >
> > and the interesting thing is that even with the error, DS (SCR) is
> creating
> > the required service...
> >
> >
> > 2014-03-21 12:14 GMT-03:00 Cristiano Gavião <cv...@gmail.com>:
> >
> >> Hi,
> >>
> >> I've created a itest to verify the behaviour of a extender bundle that
> >> uses CM inside Felix and Equinox.
> >>
> >> In Equinox everything is ok. But in Felix in getting this strange error:
> >>
> >> ERROR: Bundle org.jbehave.osgi.core [32] EventDispatcher: Error during
> >> dispatch. (java.lang.IllegalArgumentException: Collection must not be
> empty)
> >> java.lang.IllegalArgumentException: Collection must not be empty
> >>    at
> >>
> org.apache.felix.cm.impl.CaseInsensitiveDictionary.checkValue(CaseInsensitiveDictionary.java:304)
> >>    at
> >>
> org.apache.felix.cm.impl.CaseInsensitiveDictionary.<init>(CaseInsensitiveDictionary.java:85)
> >>    at
> >>
> org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:373)
> >>    at
> >>
> org.apache.felix.cm.impl.ConfigurationAdapter.update(ConfigurationAdapter.java:131)
> >>    at
> >>
> org.jbehave.osgi.core.components.AbstractExtenderComponent.createFactoryConfigurationForExtendeeWithOneItem(AbstractExtenderComponent.java:174)
> >>    at
> >>
> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.registerStoryRunnerService(StoryRunnerServiceExtenderComponent.java:136)
> >>    at
> >>
> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.processEmbedderManifestHeaderClass(StoryRunnerServiceExtenderComponent.java:120)
> >>    at
> >>
> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.onExtensionAddition(StoryRunnerServiceExtenderComponent.java:54)
> >>    at
> >>
> org.jbehave.osgi.core.components.DefaultExtensionTracker.addingBundle(DefaultExtensionTracker.java:46)
> >>    at
> >>
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)
> >>    at
> >>
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)
> >>    at
> >>
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
> >>    at
> >> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
> >>    at
> >>
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
> >>    at
> >>
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)
> >>    at
> >>
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)
> >>    at
> >>
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)
> >>    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)
> >>    at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)
> >>    at
> >> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
> >>    at
> >>
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
> >>    at java.lang.Thread.run(Thread.java:744)
> >>
> >> there is no way I
> >>
> >> the interesting thing is that
> >>
> >
> >
> >
> > --
> > "Tudo vale a pena se a alma não é pequena..."
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
"Tudo vale a pena se a alma não é pequena..."

Re: Strange error with org.apache.felix.configadmin-1.8.0

Posted by Felix Meschberger <fm...@adobe.com>.
Hi Cristiano

It is not the Properties object itself that is empty but one of the entries has its value being an empty collection.

Now, it is a good question, whether empty collections should actually be allowed in the properties or not.

Regards
Felix

Am 21.03.2014 um 09:18 schrieb Cristiano Gavião <cv...@gmail.com>:

> sorry, I push enter key before end the email... :(
> 
> continuing..
> 
> there is no way I could pass a empty property to CM because I'm checking
> this in code:
> 
>        if (properties.isEmpty()){
>            System.err.println("Could not build a Embedder for " +
> extendeeBundle);
>            return;
>        }
> 
> and the interesting thing is that even with the error, DS (SCR) is creating
> the required service...
> 
> 
> 2014-03-21 12:14 GMT-03:00 Cristiano Gavião <cv...@gmail.com>:
> 
>> Hi,
>> 
>> I've created a itest to verify the behaviour of a extender bundle that
>> uses CM inside Felix and Equinox.
>> 
>> In Equinox everything is ok. But in Felix in getting this strange error:
>> 
>> ERROR: Bundle org.jbehave.osgi.core [32] EventDispatcher: Error during
>> dispatch. (java.lang.IllegalArgumentException: Collection must not be empty)
>> java.lang.IllegalArgumentException: Collection must not be empty
>>    at
>> org.apache.felix.cm.impl.CaseInsensitiveDictionary.checkValue(CaseInsensitiveDictionary.java:304)
>>    at
>> org.apache.felix.cm.impl.CaseInsensitiveDictionary.<init>(CaseInsensitiveDictionary.java:85)
>>    at
>> org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:373)
>>    at
>> org.apache.felix.cm.impl.ConfigurationAdapter.update(ConfigurationAdapter.java:131)
>>    at
>> org.jbehave.osgi.core.components.AbstractExtenderComponent.createFactoryConfigurationForExtendeeWithOneItem(AbstractExtenderComponent.java:174)
>>    at
>> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.registerStoryRunnerService(StoryRunnerServiceExtenderComponent.java:136)
>>    at
>> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.processEmbedderManifestHeaderClass(StoryRunnerServiceExtenderComponent.java:120)
>>    at
>> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.onExtensionAddition(StoryRunnerServiceExtenderComponent.java:54)
>>    at
>> org.jbehave.osgi.core.components.DefaultExtensionTracker.addingBundle(DefaultExtensionTracker.java:46)
>>    at
>> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)
>>    at
>> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)
>>    at
>> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>>    at
>> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>>    at
>> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
>>    at
>> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)
>>    at
>> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)
>>    at
>> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)
>>    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)
>>    at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)
>>    at
>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
>>    at
>> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
>>    at java.lang.Thread.run(Thread.java:744)
>> 
>> there is no way I
>> 
>> the interesting thing is that
>> 
> 
> 
> 
> -- 
> "Tudo vale a pena se a alma não é pequena..."


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Strange error with org.apache.felix.configadmin-1.8.0

Posted by Cristiano Gavião <cv...@gmail.com>.
sorry, I push enter key before end the email... :(

continuing..

there is no way I could pass a empty property to CM because I'm checking
this in code:

        if (properties.isEmpty()){
            System.err.println("Could not build a Embedder for " +
extendeeBundle);
            return;
        }

and the interesting thing is that even with the error, DS (SCR) is creating
the required service...


2014-03-21 12:14 GMT-03:00 Cristiano Gavião <cv...@gmail.com>:

> Hi,
>
> I've created a itest to verify the behaviour of a extender bundle that
> uses CM inside Felix and Equinox.
>
> In Equinox everything is ok. But in Felix in getting this strange error:
>
> ERROR: Bundle org.jbehave.osgi.core [32] EventDispatcher: Error during
> dispatch. (java.lang.IllegalArgumentException: Collection must not be empty)
> java.lang.IllegalArgumentException: Collection must not be empty
>     at
> org.apache.felix.cm.impl.CaseInsensitiveDictionary.checkValue(CaseInsensitiveDictionary.java:304)
>     at
> org.apache.felix.cm.impl.CaseInsensitiveDictionary.<init>(CaseInsensitiveDictionary.java:85)
>     at
> org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:373)
>     at
> org.apache.felix.cm.impl.ConfigurationAdapter.update(ConfigurationAdapter.java:131)
>     at
> org.jbehave.osgi.core.components.AbstractExtenderComponent.createFactoryConfigurationForExtendeeWithOneItem(AbstractExtenderComponent.java:174)
>     at
> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.registerStoryRunnerService(StoryRunnerServiceExtenderComponent.java:136)
>     at
> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.processEmbedderManifestHeaderClass(StoryRunnerServiceExtenderComponent.java:120)
>     at
> org.jbehave.osgi.core.components.extenders.StoryRunnerServiceExtenderComponent.onExtensionAddition(StoryRunnerServiceExtenderComponent.java:54)
>     at
> org.jbehave.osgi.core.components.DefaultExtensionTracker.addingBundle(DefaultExtensionTracker.java:46)
>     at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)
>     at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)
>     at
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>     at
> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>     at
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
>     at
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)
>     at
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)
>     at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)
>     at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)
>     at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)
>     at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
>     at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
>     at java.lang.Thread.run(Thread.java:744)
>
> there is no way I
>
> the interesting thing is that
>



-- 
"Tudo vale a pena se a alma não é pequena..."