You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Matthias Neubert <su...@googlemail.com> on 2010/09/25 17:10:42 UTC

iPOJO Instance Creator Problem

Hello,

when my bundle with a ipojo component gets startet, the bundle starts proper (Active state)
but the component cannot get instantiated.

(I use Felix embedded in an Android App)
versions:
felix 3.02
ipojo 1.64

the bundle imports (in bnd):
org.osgi.service.*, org.osgi.framework

which are taken from bundles:
org.osgi.service.obr-1.0.2
org.apache.felix.bundlerepository-1.6.4




I get:

09-25 16:17:42.813: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
09-25 16:17:42.813: WARN/System.err(364): java.lang.NullPointerException: Parent ClassLoader may not be null
09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:239)
09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:226)
09-25 16:17:42.813: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.<init>(Dependency.java:853)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:395)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__start(DependencyHandler.java:526)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:303)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
09-25 16:17:42.833: WARN/System.err(364):     at java.lang.Thread.run(Thread.java:1096)
09-25 16:17:42.833: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
09-25 16:17:42.833: WARN/System.err(364): [ERROR] iPOJO Instance Creator : A matching factory was found for {instance.name=de.mnsoft.bundlemanagement.appstarter.ManagementAgent-0, component=de.mnsoft.bundlemanagement.appstarter.ManagementAgent}, but the instantiation failed : The configuration is not correct for the type de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null



metadata.xml:

<component classname="de.mnsoft.bundlemanagement.appstarter.ManagementAgent">
	<provides strategy="singleton"/> 
<!-- Field injections -->
    <requires field="m_activityService" optional="false">
    </requires>
    <requires field="m_repositoryAdmin" optional="false">
    </requires>
</component>
<instance component="de.mnsoft.bundlemanagement.appstarter.ManagementAgent"/>




Any ideas what the problem could be?


regards
Matthias

Re: iPOJO Instance Creator Problem

Posted by Clement Escoffier <cl...@gmail.com>.
On 25.09.2010, at 18:59, Matthias Neubert wrote:

> Hi,
> 
> ok that solved it! 
> No Jira Issue was raised by me finaly, 
> but please make shure this this
> is documented in ipojo documentation.
It is :
http://felix.apache.org/site/apache-felix-ipojo-supportedvms.html

> 
> Just for interest: what is the problem between smart proxys and android?

Smart proxies are classes generated on the fly (at runtime). Android can't load those classes as there are unknown in the classes.dex.

Regards,

Clement

> 
> 
> Regards
> Matthias
> 
> 
> Am 25.09.2010 um 18:19 schrieb Clement Escoffier:
> 
>> Hi,
>> 
>> Since iPOJO 1.6.0, it used smart proxies by default. Smart proxies are NOT supported on Android. On Android you must disable the proxies with the 'ipojo.proxy=disabled'system property. 
>> 
>> Regards,
>> 
>> Clement
>> 
>> 
>> 
>> 
>> On 25.09.2010, at 18:12, Karl Pauls wrote:
>> 
>>> It might be an iPOJO issue but it's hard to say for sure. Make it
>>> iPOJO for the time being.
>>> 
>>> regards,
>>> 
>>> Karl
>>> 
>>> On Sat, Sep 25, 2010 at 6:06 PM, Matthias Neubert
>>> <su...@googlemail.com> wrote:
>>>> Hi,
>>>> 
>>>> yes i will do that. should it be created for  the framework or for iPojo ?
>>>> 
>>>> If its important: with felix 2.04 and ipojo 1.40 this problem did not occur.
>>>> 
>>>> regards
>>>> Matthias
>>>> 
>>>> Am 25.09.2010 um 17:39 schrieb Karl Pauls:
>>>> 
>>>>> Strange, it sounds like ipojo is trying to create a classloader with
>>>>> null as parent. Typically, this should create a classloader that only
>>>>> delegates to the bootclassloader but throws an exception in android (I
>>>>> had the same issue inside the framework) but I don't think that ipojo
>>>>> should need to do that. Probably something else is going wrong which
>>>>> is leading to the classloader parent being null.
>>>>> 
>>>>> Could you create a jira issue for this?
>>>>> 
>>>>> regards,
>>>>> 
>>>>> Karl
>>>>> 
>>>>> On Sat, Sep 25, 2010 at 5:10 PM, Matthias Neubert
>>>>> <su...@googlemail.com> wrote:
>>>>>> Hello,
>>>>>> 
>>>>>> when my bundle with a ipojo component gets startet, the bundle starts proper (Active state)
>>>>>> but the component cannot get instantiated.
>>>>>> 
>>>>>> (I use Felix embedded in an Android App)
>>>>>> versions:
>>>>>> felix 3.02
>>>>>> ipojo 1.64
>>>>>> 
>>>>>> the bundle imports (in bnd):
>>>>>> org.osgi.service.*, org.osgi.framework
>>>>>> 
>>>>>> which are taken from bundles:
>>>>>> org.osgi.service.obr-1.0.2
>>>>>> org.apache.felix.bundlerepository-1.6.4
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> I get:
>>>>>> 
>>>>>> 09-25 16:17:42.813: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>>>> 09-25 16:17:42.813: WARN/System.err(364): java.lang.NullPointerException: Parent ClassLoader may not be null
>>>>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:239)
>>>>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:226)
>>>>>> 09-25 16:17:42.813: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.<init>(Dependency.java:853)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:395)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__start(DependencyHandler.java:526)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:303)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at java.lang.Thread.run(Thread.java:1096)
>>>>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] iPOJO Instance Creator : A matching factory was found for {instance.name=de.mnsoft.bundlemanagement.appstarter.ManagementAgent-0, component=de.mnsoft.bundlemanagement.appstarter.ManagementAgent}, but the instantiation failed : The configuration is not correct for the type de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> metadata.xml:
>>>>>> 
>>>>>> <component classname="de.mnsoft.bundlemanagement.appstarter.ManagementAgent">
>>>>>>      <provides strategy="singleton"/>
>>>>>> <!-- Field injections -->
>>>>>>  <requires field="m_activityService" optional="false">
>>>>>>  </requires>
>>>>>>  <requires field="m_repositoryAdmin" optional="false">
>>>>>>  </requires>
>>>>>> </component>
>>>>>> <instance component="de.mnsoft.bundlemanagement.appstarter.ManagementAgent"/>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Any ideas what the problem could be?
>>>>>> 
>>>>>> 
>>>>>> regards
>>>>>> Matthias
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Karl Pauls
>>>>> karlpauls@gmail.com
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Karl Pauls
>>> karlpauls@gmail.com
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


Re: iPOJO Instance Creator Problem

Posted by Matthias Neubert <su...@googlemail.com>.
Hi,

ok that solved it! 
No Jira Issue was raised by me finaly, 
but please make shure this this
is documented in ipojo documentation.

Just for interest: what is the problem between smart proxys and android?


Regards
Matthias


Am 25.09.2010 um 18:19 schrieb Clement Escoffier:

> Hi,
> 
> Since iPOJO 1.6.0, it used smart proxies by default. Smart proxies are NOT supported on Android. On Android you must disable the proxies with the 'ipojo.proxy=disabled'system property. 
> 
> Regards,
> 
> Clement
> 
> 
> 
> 
> On 25.09.2010, at 18:12, Karl Pauls wrote:
> 
>> It might be an iPOJO issue but it's hard to say for sure. Make it
>> iPOJO for the time being.
>> 
>> regards,
>> 
>> Karl
>> 
>> On Sat, Sep 25, 2010 at 6:06 PM, Matthias Neubert
>> <su...@googlemail.com> wrote:
>>> Hi,
>>> 
>>> yes i will do that. should it be created for  the framework or for iPojo ?
>>> 
>>> If its important: with felix 2.04 and ipojo 1.40 this problem did not occur.
>>> 
>>> regards
>>> Matthias
>>> 
>>> Am 25.09.2010 um 17:39 schrieb Karl Pauls:
>>> 
>>>> Strange, it sounds like ipojo is trying to create a classloader with
>>>> null as parent. Typically, this should create a classloader that only
>>>> delegates to the bootclassloader but throws an exception in android (I
>>>> had the same issue inside the framework) but I don't think that ipojo
>>>> should need to do that. Probably something else is going wrong which
>>>> is leading to the classloader parent being null.
>>>> 
>>>> Could you create a jira issue for this?
>>>> 
>>>> regards,
>>>> 
>>>> Karl
>>>> 
>>>> On Sat, Sep 25, 2010 at 5:10 PM, Matthias Neubert
>>>> <su...@googlemail.com> wrote:
>>>>> Hello,
>>>>> 
>>>>> when my bundle with a ipojo component gets startet, the bundle starts proper (Active state)
>>>>> but the component cannot get instantiated.
>>>>> 
>>>>> (I use Felix embedded in an Android App)
>>>>> versions:
>>>>> felix 3.02
>>>>> ipojo 1.64
>>>>> 
>>>>> the bundle imports (in bnd):
>>>>> org.osgi.service.*, org.osgi.framework
>>>>> 
>>>>> which are taken from bundles:
>>>>> org.osgi.service.obr-1.0.2
>>>>> org.apache.felix.bundlerepository-1.6.4
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> I get:
>>>>> 
>>>>> 09-25 16:17:42.813: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>>> 09-25 16:17:42.813: WARN/System.err(364): java.lang.NullPointerException: Parent ClassLoader may not be null
>>>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:239)
>>>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:226)
>>>>> 09-25 16:17:42.813: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.<init>(Dependency.java:853)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:395)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__start(DependencyHandler.java:526)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:303)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>>>>> 09-25 16:17:42.833: WARN/System.err(364):     at java.lang.Thread.run(Thread.java:1096)
>>>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] iPOJO Instance Creator : A matching factory was found for {instance.name=de.mnsoft.bundlemanagement.appstarter.ManagementAgent-0, component=de.mnsoft.bundlemanagement.appstarter.ManagementAgent}, but the instantiation failed : The configuration is not correct for the type de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>>> 
>>>>> 
>>>>> 
>>>>> metadata.xml:
>>>>> 
>>>>> <component classname="de.mnsoft.bundlemanagement.appstarter.ManagementAgent">
>>>>>       <provides strategy="singleton"/>
>>>>> <!-- Field injections -->
>>>>>   <requires field="m_activityService" optional="false">
>>>>>   </requires>
>>>>>   <requires field="m_repositoryAdmin" optional="false">
>>>>>   </requires>
>>>>> </component>
>>>>> <instance component="de.mnsoft.bundlemanagement.appstarter.ManagementAgent"/>
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Any ideas what the problem could be?
>>>>> 
>>>>> 
>>>>> regards
>>>>> Matthias
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Karl Pauls
>>>> karlpauls@gmail.com
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>>> 
>> 
>> 
>> 
>> -- 
>> Karl Pauls
>> karlpauls@gmail.com
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
> 


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


Re: iPOJO Instance Creator Problem

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

Since iPOJO 1.6.0, it used smart proxies by default. Smart proxies are NOT supported on Android. On Android you must disable the proxies with the 'ipojo.proxy=disabled'system property. 

Regards,

Clement




On 25.09.2010, at 18:12, Karl Pauls wrote:

> It might be an iPOJO issue but it's hard to say for sure. Make it
> iPOJO for the time being.
> 
> regards,
> 
> Karl
> 
> On Sat, Sep 25, 2010 at 6:06 PM, Matthias Neubert
> <su...@googlemail.com> wrote:
>> Hi,
>> 
>> yes i will do that. should it be created for  the framework or for iPojo ?
>> 
>> If its important: with felix 2.04 and ipojo 1.40 this problem did not occur.
>> 
>> regards
>> Matthias
>> 
>> Am 25.09.2010 um 17:39 schrieb Karl Pauls:
>> 
>>> Strange, it sounds like ipojo is trying to create a classloader with
>>> null as parent. Typically, this should create a classloader that only
>>> delegates to the bootclassloader but throws an exception in android (I
>>> had the same issue inside the framework) but I don't think that ipojo
>>> should need to do that. Probably something else is going wrong which
>>> is leading to the classloader parent being null.
>>> 
>>> Could you create a jira issue for this?
>>> 
>>> regards,
>>> 
>>> Karl
>>> 
>>> On Sat, Sep 25, 2010 at 5:10 PM, Matthias Neubert
>>> <su...@googlemail.com> wrote:
>>>> Hello,
>>>> 
>>>> when my bundle with a ipojo component gets startet, the bundle starts proper (Active state)
>>>> but the component cannot get instantiated.
>>>> 
>>>> (I use Felix embedded in an Android App)
>>>> versions:
>>>> felix 3.02
>>>> ipojo 1.64
>>>> 
>>>> the bundle imports (in bnd):
>>>> org.osgi.service.*, org.osgi.framework
>>>> 
>>>> which are taken from bundles:
>>>> org.osgi.service.obr-1.0.2
>>>> org.apache.felix.bundlerepository-1.6.4
>>>> 
>>>> 
>>>> 
>>>> 
>>>> I get:
>>>> 
>>>> 09-25 16:17:42.813: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>> 09-25 16:17:42.813: WARN/System.err(364): java.lang.NullPointerException: Parent ClassLoader may not be null
>>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:239)
>>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:226)
>>>> 09-25 16:17:42.813: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.<init>(Dependency.java:853)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:395)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__start(DependencyHandler.java:526)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:303)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>>>> 09-25 16:17:42.833: WARN/System.err(364):     at java.lang.Thread.run(Thread.java:1096)
>>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] iPOJO Instance Creator : A matching factory was found for {instance.name=de.mnsoft.bundlemanagement.appstarter.ManagementAgent-0, component=de.mnsoft.bundlemanagement.appstarter.ManagementAgent}, but the instantiation failed : The configuration is not correct for the type de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>> 
>>>> 
>>>> 
>>>> metadata.xml:
>>>> 
>>>> <component classname="de.mnsoft.bundlemanagement.appstarter.ManagementAgent">
>>>>        <provides strategy="singleton"/>
>>>> <!-- Field injections -->
>>>>    <requires field="m_activityService" optional="false">
>>>>    </requires>
>>>>    <requires field="m_repositoryAdmin" optional="false">
>>>>    </requires>
>>>> </component>
>>>> <instance component="de.mnsoft.bundlemanagement.appstarter.ManagementAgent"/>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Any ideas what the problem could be?
>>>> 
>>>> 
>>>> regards
>>>> Matthias
>>> 
>>> 
>>> 
>>> --
>>> Karl Pauls
>>> karlpauls@gmail.com
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Karl Pauls
> karlpauls@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


Re: iPOJO Instance Creator Problem

Posted by Karl Pauls <ka...@gmail.com>.
It might be an iPOJO issue but it's hard to say for sure. Make it
iPOJO for the time being.

regards,

Karl

On Sat, Sep 25, 2010 at 6:06 PM, Matthias Neubert
<su...@googlemail.com> wrote:
> Hi,
>
> yes i will do that. should it be created for  the framework or for iPojo ?
>
> If its important: with felix 2.04 and ipojo 1.40 this problem did not occur.
>
> regards
> Matthias
>
> Am 25.09.2010 um 17:39 schrieb Karl Pauls:
>
>> Strange, it sounds like ipojo is trying to create a classloader with
>> null as parent. Typically, this should create a classloader that only
>> delegates to the bootclassloader but throws an exception in android (I
>> had the same issue inside the framework) but I don't think that ipojo
>> should need to do that. Probably something else is going wrong which
>> is leading to the classloader parent being null.
>>
>> Could you create a jira issue for this?
>>
>> regards,
>>
>> Karl
>>
>> On Sat, Sep 25, 2010 at 5:10 PM, Matthias Neubert
>> <su...@googlemail.com> wrote:
>>> Hello,
>>>
>>> when my bundle with a ipojo component gets startet, the bundle starts proper (Active state)
>>> but the component cannot get instantiated.
>>>
>>> (I use Felix embedded in an Android App)
>>> versions:
>>> felix 3.02
>>> ipojo 1.64
>>>
>>> the bundle imports (in bnd):
>>> org.osgi.service.*, org.osgi.framework
>>>
>>> which are taken from bundles:
>>> org.osgi.service.obr-1.0.2
>>> org.apache.felix.bundlerepository-1.6.4
>>>
>>>
>>>
>>>
>>> I get:
>>>
>>> 09-25 16:17:42.813: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>> 09-25 16:17:42.813: WARN/System.err(364): java.lang.NullPointerException: Parent ClassLoader may not be null
>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:239)
>>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:226)
>>> 09-25 16:17:42.813: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.<init>(Dependency.java:853)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:395)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__start(DependencyHandler.java:526)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:303)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>>> 09-25 16:17:42.833: WARN/System.err(364):     at java.lang.Thread.run(Thread.java:1096)
>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] iPOJO Instance Creator : A matching factory was found for {instance.name=de.mnsoft.bundlemanagement.appstarter.ManagementAgent-0, component=de.mnsoft.bundlemanagement.appstarter.ManagementAgent}, but the instantiation failed : The configuration is not correct for the type de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>>>
>>>
>>>
>>> metadata.xml:
>>>
>>> <component classname="de.mnsoft.bundlemanagement.appstarter.ManagementAgent">
>>>        <provides strategy="singleton"/>
>>> <!-- Field injections -->
>>>    <requires field="m_activityService" optional="false">
>>>    </requires>
>>>    <requires field="m_repositoryAdmin" optional="false">
>>>    </requires>
>>> </component>
>>> <instance component="de.mnsoft.bundlemanagement.appstarter.ManagementAgent"/>
>>>
>>>
>>>
>>>
>>> Any ideas what the problem could be?
>>>
>>>
>>> regards
>>> Matthias
>>
>>
>>
>> --
>> Karl Pauls
>> karlpauls@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

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


Re: iPOJO Instance Creator Problem

Posted by Matthias Neubert <su...@googlemail.com>.
Hi,

yes i will do that. should it be created for  the framework or for iPojo ?

If its important: with felix 2.04 and ipojo 1.40 this problem did not occur.

regards
Matthias

Am 25.09.2010 um 17:39 schrieb Karl Pauls:

> Strange, it sounds like ipojo is trying to create a classloader with
> null as parent. Typically, this should create a classloader that only
> delegates to the bootclassloader but throws an exception in android (I
> had the same issue inside the framework) but I don't think that ipojo
> should need to do that. Probably something else is going wrong which
> is leading to the classloader parent being null.
> 
> Could you create a jira issue for this?
> 
> regards,
> 
> Karl
> 
> On Sat, Sep 25, 2010 at 5:10 PM, Matthias Neubert
> <su...@googlemail.com> wrote:
>> Hello,
>> 
>> when my bundle with a ipojo component gets startet, the bundle starts proper (Active state)
>> but the component cannot get instantiated.
>> 
>> (I use Felix embedded in an Android App)
>> versions:
>> felix 3.02
>> ipojo 1.64
>> 
>> the bundle imports (in bnd):
>> org.osgi.service.*, org.osgi.framework
>> 
>> which are taken from bundles:
>> org.osgi.service.obr-1.0.2
>> org.apache.felix.bundlerepository-1.6.4
>> 
>> 
>> 
>> 
>> I get:
>> 
>> 09-25 16:17:42.813: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>> 09-25 16:17:42.813: WARN/System.err(364): java.lang.NullPointerException: Parent ClassLoader may not be null
>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:239)
>> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:226)
>> 09-25 16:17:42.813: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.<init>(Dependency.java:853)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:395)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__start(DependencyHandler.java:526)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:303)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>> 09-25 16:17:42.833: WARN/System.err(364):     at java.lang.Thread.run(Thread.java:1096)
>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] iPOJO Instance Creator : A matching factory was found for {instance.name=de.mnsoft.bundlemanagement.appstarter.ManagementAgent-0, component=de.mnsoft.bundlemanagement.appstarter.ManagementAgent}, but the instantiation failed : The configuration is not correct for the type de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>> 
>> 
>> 
>> metadata.xml:
>> 
>> <component classname="de.mnsoft.bundlemanagement.appstarter.ManagementAgent">
>>        <provides strategy="singleton"/>
>> <!-- Field injections -->
>>    <requires field="m_activityService" optional="false">
>>    </requires>
>>    <requires field="m_repositoryAdmin" optional="false">
>>    </requires>
>> </component>
>> <instance component="de.mnsoft.bundlemanagement.appstarter.ManagementAgent"/>
>> 
>> 
>> 
>> 
>> Any ideas what the problem could be?
>> 
>> 
>> regards
>> Matthias
> 
> 
> 
> -- 
> Karl Pauls
> karlpauls@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


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


Re: iPOJO Instance Creator Problem

Posted by Karl Pauls <ka...@gmail.com>.
Strange, it sounds like ipojo is trying to create a classloader with
null as parent. Typically, this should create a classloader that only
delegates to the bootclassloader but throws an exception in android (I
had the same issue inside the framework) but I don't think that ipojo
should need to do that. Probably something else is going wrong which
is leading to the classloader parent being null.

Could you create a jira issue for this?

regards,

Karl

On Sat, Sep 25, 2010 at 5:10 PM, Matthias Neubert
<su...@googlemail.com> wrote:
> Hello,
>
> when my bundle with a ipojo component gets startet, the bundle starts proper (Active state)
> but the component cannot get instantiated.
>
> (I use Felix embedded in an Android App)
> versions:
> felix 3.02
> ipojo 1.64
>
> the bundle imports (in bnd):
> org.osgi.service.*, org.osgi.framework
>
> which are taken from bundles:
> org.osgi.service.obr-1.0.2
> org.apache.felix.bundlerepository-1.6.4
>
>
>
>
> I get:
>
> 09-25 16:17:42.813: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
> 09-25 16:17:42.813: WARN/System.err(364): java.lang.NullPointerException: Parent ClassLoader may not be null
> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:239)
> 09-25 16:17:42.813: WARN/System.err(364):     at java.lang.ClassLoader.<init>(ClassLoader.java:226)
> 09-25 16:17:42.813: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.<init>(Dependency.java:853)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:395)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__start(DependencyHandler.java:526)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:303)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
> 09-25 16:17:42.833: WARN/System.err(364):     at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
> 09-25 16:17:42.833: WARN/System.err(364):     at java.lang.Thread.run(Thread.java:1096)
> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
> 09-25 16:17:42.833: WARN/System.err(364): [ERROR] iPOJO Instance Creator : A matching factory was found for {instance.name=de.mnsoft.bundlemanagement.appstarter.ManagementAgent-0, component=de.mnsoft.bundlemanagement.appstarter.ManagementAgent}, but the instantiation failed : The configuration is not correct for the type de.mnsoft.bundlemanagement.appstarter.ManagementAgent : Parent ClassLoader may not be null
>
>
>
> metadata.xml:
>
> <component classname="de.mnsoft.bundlemanagement.appstarter.ManagementAgent">
>        <provides strategy="singleton"/>
> <!-- Field injections -->
>    <requires field="m_activityService" optional="false">
>    </requires>
>    <requires field="m_repositoryAdmin" optional="false">
>    </requires>
> </component>
> <instance component="de.mnsoft.bundlemanagement.appstarter.ManagementAgent"/>
>
>
>
>
> Any ideas what the problem could be?
>
>
> regards
> Matthias



-- 
Karl Pauls
karlpauls@gmail.com

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