You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Charles Moulliard <cm...@gmail.com> on 2012/06/14 22:44:31 UTC

NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Hi,

What could be the reason why we get a NPE at the followoing line

Caused by: java.lang.NullPointerException
at
org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded(ResolverImpl.java:1156)
at
org.apache.felix.framework.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:1085)
at
org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:171)
at org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:4103)
at
org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1412)
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:734)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:349)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)

Regards,

Charles Moulliard

Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard

Re: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 6/15/12 10:41 , Charles Moulliard wrote:
> Can I use this address (heavy@ungoverned.org) ?

Is there any other? ;-)

Sure.

-> richard

>
> On Fri, Jun 15, 2012 at 4:18 PM, Richard S. Hall<he...@ungoverned.org>wrote:
>
>> On 6/15/12 10:10 , Charles Moulliard wrote:
>>
>>> Creating a test case is a bit complex except if I zip the project (Karaf
>>> server containing the code deployed) and send it ?
>>>
>> If you can get it to reproduce that way, then send it to me off list with
>> the steps to reproduce it and I'll look into it.
>>
>> ->  richard
>>
>>
>>> On Fri, Jun 15, 2012 at 3:44 PM, Richard S. Hall<he...@ungoverned.org>**
>>> wrote:
>>>
>>>   I'm not sure if this is related to Proxy creation or not. I do believe
>>>> there could be some issues with that. However, I think this issue is more
>>>> related to dynamic imports...that's just a guess.
>>>>
>>>> This still needs to be tested on 4.0.x, though...and I'll probably only
>>>> ever get to the bottom of it if we can get me to reproduce it.
>>>>
>>>> ->   richard
>>>>
>>>>
>>>> On 6/15/12 02:46 , Charles Moulliard wrote:
>>>>
>>>>   Hi Richard,
>>>>> Version of Felix and Karaf used are :
>>>>>
>>>>> Karaf
>>>>>    Karaf version               2.2.7
>>>>>    Karaf home
>>>>>   /Users/chmoulli/****MyApplications/apache-karaf-2.****2.7
>>>>>    Karaf base
>>>>>   /Users/chmoulli/****MyApplications/apache-karaf-2.****2.7
>>>>>
>>>>>    OSGi Framework              org.apache.felix.framework - 3.0.9
>>>>>
>>>>> JVM
>>>>>    Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
>>>>> 20.8-b03-424
>>>>>    Version                     1.6.0_33
>>>>>
>>>>> In our scenario, we use weld-osgi to create for each bundle a CDI
>>>>> container. The CDI container depending on the CDI annotations (@Inject,
>>>>> ...) discovered in the bundle will instantiate some new beans and add
>>>>> them
>>>>> to the class loader. In my case the bundle A = example has a reference
>>>>> to
>>>>> a
>>>>> class exported by a bundle B (= CdiCamelContext) and this class
>>>>> CdiCamelContext is created using java.lang.reflect.Proxy.****
>>>>>
>>>>> newProxyInstance().
>>>>>
>>>>> Remark, this class CdiCamelContext extends a CamelContext class exported
>>>>> by
>>>>> another bundle = C. The package B imports well the packages from C.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Charles
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>   On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall<heavy@ungoverned.org
>>>>>> *
>>>>>> *wrote:
>>>>>>
>>>>>>
>>>>>>   On 6/14/12 16:44 , Charles Moulliard wrote:
>>>>>>
>>>>>>>   Hi,
>>>>>>>
>>>>>>>> What could be the reason why we get a NPE at the followoing line
>>>>>>>>
>>>>>>>>   Not sure. A similar issue was reported in:
>>>>>>>>
>>>>>>>     https://issues.apache.org/******jira/browse/FELIX-3003<https://issues.apache.org/****jira/browse/FELIX-3003>
>>>>>>> <https:/**/issues.apache.org/**jira/**browse/FELIX-3003<https://issues.apache.org/**jira/browse/FELIX-3003>
>>>>>>> <https:/**/issues.apache.org/**jira/**browse/FELIX-3003<http://issues.apache.org/jira/**browse/FELIX-3003>
>>>>>>> <https**://issues.apache.org/jira/**browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>>>>>>>
>>>>>>> Can you reproduce this? That would make it a lot easier to track down.
>>>>>>>
>>>>>>> It is also not clear which version of the framework you are using...it
>>>>>>> doesn't appear to be 4.0.x.
>>>>>>>
>>>>>>> ->    richard
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>   Caused by: java.lang.NullPointerException
>>>>>>>
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.******resolver.ResolverImpl.****
>>>>>>>> permutateIfNeeded(*
>>>>>>>> *ResolverImpl.java:1156)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.******resolver.ResolverImpl.**
>>>>>>>> checkPackageSpaceConsistency(******ResolverImpl.java:1085)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.******resolver.ResolverImpl.**
>>>>>>>> resolve(****
>>>>>>>> ResolverImpl.java:171)
>>>>>>>> at org.apache.felix.framework.******Felix$FelixResolver.resolve(****
>>>>>>>> Felix.java:4103)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.******ModuleImpl.******
>>>>>>>> searchDynamicImports(**
>>>>>>>> ModuleImpl.java:1412)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.******ModuleImpl.****
>>>>>>>> findClassOrResourceByDelegatio
>>>>>>>> **n(ModuleImpl.java:734)
>>>>>>>> at org.apache.felix.framework.******ModuleImpl.access$400(**
>>>>>>>> ModuleImpl.java:71)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.******ModuleImpl$ModuleClassLoader.******
>>>>>>>> loadClass(ModuleImpl.java:******1768)
>>>>>>>> at java.lang.ClassLoader.******loadClass(ClassLoader.java:******247)
>>>>>>>> at java.lang.Class.forName0(******Native Method)
>>>>>>>> at java.lang.Class.forName(Class.******java:247)
>>>>>>>> at java.lang.reflect.Proxy.******getProxyClass(Proxy.java:349)
>>>>>>>> at java.lang.reflect.Proxy.******newProxyInstance(Proxy.java:****
>>>>>>>> **581)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Charles Moulliard
>>>>>>>>
>>>>>>>> Apache Committer
>>>>>>>>
>>>>>>>> Blog : http://cmoulliard.blogspot.com
>>>>>>>> Twitter : http://twitter.com/cmoulliard
>>>>>>>> Linkedin : http://www.linkedin.com/in/******charlesmoulliard<http://www.linkedin.com/in/****charlesmoulliard>
>>>>>>>> <http://www.**linkedin.com/in/****charlesmoulliard<http://www.linkedin.com/in/**charlesmoulliard>
>>>>>>>> <http://www.**linkedin.com/in/****charlesmoulliard<http://linkedin.com/in/**charlesmoulliard>
>>>>>>>> <http://www.**linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>>>>>>>> Skype: cmoulliard
>>>>>>>>
>>>>>>>>
>>>>>>>>   ------------------------------******--------------------------**
>>>>>>>> --**
>>>>>>>>
>>>>>>> --**---------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.****apac**he.org<
>>>>>>> http://apache.org**>
>>>>>>> <users-unsubscribe@**felix.**apache.org<http://felix.apache.org><
>>>>>>> users-unsubscribe@**felix.apache.org<us...@felix.apache.org>
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>   ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apac**he.org<http://apache.org>
>>>> <us...@felix.apache.org>
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@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: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by Charles Moulliard <cm...@gmail.com>.
Can I use this address (heavy@ungoverned.org) ?

On Fri, Jun 15, 2012 at 4:18 PM, Richard S. Hall <he...@ungoverned.org>wrote:

> On 6/15/12 10:10 , Charles Moulliard wrote:
>
>> Creating a test case is a bit complex except if I zip the project (Karaf
>> server containing the code deployed) and send it ?
>>
>
> If you can get it to reproduce that way, then send it to me off list with
> the steps to reproduce it and I'll look into it.
>
> -> richard
>
>
>> On Fri, Jun 15, 2012 at 3:44 PM, Richard S. Hall<he...@ungoverned.org>**
>> wrote:
>>
>>  I'm not sure if this is related to Proxy creation or not. I do believe
>>> there could be some issues with that. However, I think this issue is more
>>> related to dynamic imports...that's just a guess.
>>>
>>> This still needs to be tested on 4.0.x, though...and I'll probably only
>>> ever get to the bottom of it if we can get me to reproduce it.
>>>
>>> ->  richard
>>>
>>>
>>> On 6/15/12 02:46 , Charles Moulliard wrote:
>>>
>>>  Hi Richard,
>>>>
>>>> Version of Felix and Karaf used are :
>>>>
>>>> Karaf
>>>>   Karaf version               2.2.7
>>>>   Karaf home
>>>>  /Users/chmoulli/****MyApplications/apache-karaf-2.****2.7
>>>>   Karaf base
>>>>  /Users/chmoulli/****MyApplications/apache-karaf-2.****2.7
>>>>
>>>>   OSGi Framework              org.apache.felix.framework - 3.0.9
>>>>
>>>> JVM
>>>>   Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
>>>> 20.8-b03-424
>>>>   Version                     1.6.0_33
>>>>
>>>> In our scenario, we use weld-osgi to create for each bundle a CDI
>>>> container. The CDI container depending on the CDI annotations (@Inject,
>>>> ...) discovered in the bundle will instantiate some new beans and add
>>>> them
>>>> to the class loader. In my case the bundle A = example has a reference
>>>> to
>>>> a
>>>> class exported by a bundle B (= CdiCamelContext) and this class
>>>> CdiCamelContext is created using java.lang.reflect.Proxy.****
>>>>
>>>> newProxyInstance().
>>>>
>>>> Remark, this class CdiCamelContext extends a CamelContext class exported
>>>> by
>>>> another bundle = C. The package B imports well the packages from C.
>>>>
>>>> Regards,
>>>>
>>>> Charles
>>>>
>>>>
>>>>
>>>>
>>>>  On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall<heavy@ungoverned.org
>>>> >*
>>>>
>>>>> *wrote:
>>>>>
>>>>>
>>>>>  On 6/14/12 16:44 , Charles Moulliard wrote:
>>>>>
>>>>>>  Hi,
>>>>>>
>>>>>>> What could be the reason why we get a NPE at the followoing line
>>>>>>>
>>>>>>>  Not sure. A similar issue was reported in:
>>>>>>>
>>>>>>    https://issues.apache.org/******jira/browse/FELIX-3003<https://issues.apache.org/****jira/browse/FELIX-3003>
>>>>>> <https:/**/issues.apache.org/**jira/**browse/FELIX-3003<https://issues.apache.org/**jira/browse/FELIX-3003>
>>>>>> >
>>>>>> <https:/**/issues.apache.org/**jira/**browse/FELIX-3003<http://issues.apache.org/jira/**browse/FELIX-3003>
>>>>>> <https**://issues.apache.org/jira/**browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>>>>>> >
>>>>>>
>>>>>>
>>>>>> Can you reproduce this? That would make it a lot easier to track down.
>>>>>>
>>>>>> It is also not clear which version of the framework you are using...it
>>>>>> doesn't appear to be 4.0.x.
>>>>>>
>>>>>> ->   richard
>>>>>>
>>>>>>
>>>>>>
>>>>>>  Caused by: java.lang.NullPointerException
>>>>>>
>>>>>>> at
>>>>>>> org.apache.felix.framework.******resolver.ResolverImpl.****
>>>>>>> permutateIfNeeded(*
>>>>>>> *ResolverImpl.java:1156)
>>>>>>> at
>>>>>>> org.apache.felix.framework.******resolver.ResolverImpl.**
>>>>>>> checkPackageSpaceConsistency(******ResolverImpl.java:1085)
>>>>>>> at
>>>>>>> org.apache.felix.framework.******resolver.ResolverImpl.**
>>>>>>> resolve(****
>>>>>>> ResolverImpl.java:171)
>>>>>>> at org.apache.felix.framework.******Felix$FelixResolver.resolve(****
>>>>>>> Felix.java:4103)
>>>>>>> at
>>>>>>> org.apache.felix.framework.******ModuleImpl.******
>>>>>>> searchDynamicImports(**
>>>>>>> ModuleImpl.java:1412)
>>>>>>> at
>>>>>>> org.apache.felix.framework.******ModuleImpl.****
>>>>>>> findClassOrResourceByDelegatio
>>>>>>> **n(ModuleImpl.java:734)
>>>>>>> at org.apache.felix.framework.******ModuleImpl.access$400(**
>>>>>>> ModuleImpl.java:71)
>>>>>>> at
>>>>>>> org.apache.felix.framework.******ModuleImpl$ModuleClassLoader.******
>>>>>>> loadClass(ModuleImpl.java:******1768)
>>>>>>> at java.lang.ClassLoader.******loadClass(ClassLoader.java:******247)
>>>>>>> at java.lang.Class.forName0(******Native Method)
>>>>>>> at java.lang.Class.forName(Class.******java:247)
>>>>>>> at java.lang.reflect.Proxy.******getProxyClass(Proxy.java:349)
>>>>>>> at java.lang.reflect.Proxy.******newProxyInstance(Proxy.java:****
>>>>>>> **581)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Charles Moulliard
>>>>>>>
>>>>>>> Apache Committer
>>>>>>>
>>>>>>> Blog : http://cmoulliard.blogspot.com
>>>>>>> Twitter : http://twitter.com/cmoulliard
>>>>>>> Linkedin : http://www.linkedin.com/in/******charlesmoulliard<http://www.linkedin.com/in/****charlesmoulliard>
>>>>>>> <http://www.**linkedin.com/in/****charlesmoulliard<http://www.linkedin.com/in/**charlesmoulliard>
>>>>>>> >
>>>>>>> <http://www.**linkedin.com/in/****charlesmoulliard<http://linkedin.com/in/**charlesmoulliard>
>>>>>>> <http://www.**linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>>>>>>> >
>>>>>>> Skype: cmoulliard
>>>>>>>
>>>>>>>
>>>>>>>  ------------------------------******--------------------------**
>>>>>>> --**
>>>>>>>
>>>>>> --**---------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.****apac**he.org<
>>>>>> http://apache.org**>
>>>>>> <users-unsubscribe@**felix.**apache.org <http://felix.apache.org><
>>>>>> users-unsubscribe@**felix.apache.org<us...@felix.apache.org>
>>>>>> >
>>>>>>
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>  ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apac**he.org<http://apache.org>
>>> <us...@felix.apache.org>
>>> >
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Ok, I think I've got it figured out...I'll follow up on FELIX-3003...

Thanks for the example.

-> richard

On 6/15/12 10:18 , Richard S. Hall wrote:
> On 6/15/12 10:10 , Charles Moulliard wrote:
>> Creating a test case is a bit complex except if I zip the project (Karaf
>> server containing the code deployed) and send it ?
>
> If you can get it to reproduce that way, then send it to me off list 
> with the steps to reproduce it and I'll look into it.
>
> -> richard
>
>>
>> On Fri, Jun 15, 2012 at 3:44 PM, Richard S. 
>> Hall<he...@ungoverned.org>wrote:
>>
>>> I'm not sure if this is related to Proxy creation or not. I do believe
>>> there could be some issues with that. However, I think this issue is 
>>> more
>>> related to dynamic imports...that's just a guess.
>>>
>>> This still needs to be tested on 4.0.x, though...and I'll probably only
>>> ever get to the bottom of it if we can get me to reproduce it.
>>>
>>> ->  richard
>>>
>>>
>>> On 6/15/12 02:46 , Charles Moulliard wrote:
>>>
>>>> Hi Richard,
>>>>
>>>> Version of Felix and Karaf used are :
>>>>
>>>> Karaf
>>>>    Karaf version               2.2.7
>>>>    Karaf home
>>>>   /Users/chmoulli/**MyApplications/apache-karaf-2.**2.7
>>>>    Karaf base
>>>>   /Users/chmoulli/**MyApplications/apache-karaf-2.**2.7
>>>>    OSGi Framework              org.apache.felix.framework - 3.0.9
>>>>
>>>> JVM
>>>>    Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM 
>>>> version
>>>> 20.8-b03-424
>>>>    Version                     1.6.0_33
>>>>
>>>> In our scenario, we use weld-osgi to create for each bundle a CDI
>>>> container. The CDI container depending on the CDI annotations 
>>>> (@Inject,
>>>> ...) discovered in the bundle will instantiate some new beans and 
>>>> add them
>>>> to the class loader. In my case the bundle A = example has a 
>>>> reference to
>>>> a
>>>> class exported by a bundle B (= CdiCamelContext) and this class
>>>> CdiCamelContext is created using java.lang.reflect.Proxy.****
>>>> newProxyInstance().
>>>>
>>>> Remark, this class CdiCamelContext extends a CamelContext class 
>>>> exported
>>>> by
>>>> another bundle = C. The package B imports well the packages from C.
>>>>
>>>> Regards,
>>>>
>>>> Charles
>>>>
>>>>
>>>>
>>>>
>>>>   On Thu, Jun 14, 2012 at 10:54 PM, Richard S. 
>>>> Hall<he...@ungoverned.org>*
>>>>> *wrote:
>>>>>
>>>>>   On 6/14/12 16:44 , Charles Moulliard wrote:
>>>>>>   Hi,
>>>>>>> What could be the reason why we get a NPE at the followoing line
>>>>>>>
>>>>>>>   Not sure. A similar issue was reported in:
>>>>>>     
>>>>>> https://issues.apache.org/****jira/browse/FELIX-3003<https://issues.apache.org/**jira/browse/FELIX-3003>
>>>>>> <https:/**/issues.apache.org/jira/**browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003> 
>>>>>>
>>>>>>
>>>>>> Can you reproduce this? That would make it a lot easier to track 
>>>>>> down.
>>>>>>
>>>>>> It is also not clear which version of the framework you are 
>>>>>> using...it
>>>>>> doesn't appear to be 4.0.x.
>>>>>>
>>>>>> ->   richard
>>>>>>
>>>>>>
>>>>>>
>>>>>>   Caused by: java.lang.NullPointerException
>>>>>>> at
>>>>>>> org.apache.felix.framework.****resolver.ResolverImpl.****
>>>>>>> permutateIfNeeded(*
>>>>>>> *ResolverImpl.java:1156)
>>>>>>> at
>>>>>>> org.apache.felix.framework.****resolver.ResolverImpl.**
>>>>>>> checkPackageSpaceConsistency(****ResolverImpl.java:1085)
>>>>>>> at
>>>>>>> org.apache.felix.framework.****resolver.ResolverImpl.resolve(****
>>>>>>> ResolverImpl.java:171)
>>>>>>> at org.apache.felix.framework.****Felix$FelixResolver.resolve(**
>>>>>>> Felix.java:4103)
>>>>>>> at
>>>>>>> org.apache.felix.framework.****ModuleImpl.****searchDynamicImports(** 
>>>>>>>
>>>>>>> ModuleImpl.java:1412)
>>>>>>> at
>>>>>>> org.apache.felix.framework.****ModuleImpl.****
>>>>>>> findClassOrResourceByDelegatio
>>>>>>> **n(ModuleImpl.java:734)
>>>>>>> at org.apache.felix.framework.****ModuleImpl.access$400(**
>>>>>>> ModuleImpl.java:71)
>>>>>>> at
>>>>>>> org.apache.felix.framework.****ModuleImpl$ModuleClassLoader.****
>>>>>>> loadClass(ModuleImpl.java:****1768)
>>>>>>> at java.lang.ClassLoader.****loadClass(ClassLoader.java:****247)
>>>>>>> at java.lang.Class.forName0(****Native Method)
>>>>>>> at java.lang.Class.forName(Class.****java:247)
>>>>>>> at java.lang.reflect.Proxy.****getProxyClass(Proxy.java:349)
>>>>>>> at java.lang.reflect.Proxy.****newProxyInstance(Proxy.java:****581)
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Charles Moulliard
>>>>>>>
>>>>>>> Apache Committer
>>>>>>>
>>>>>>> Blog : http://cmoulliard.blogspot.com
>>>>>>> Twitter : http://twitter.com/cmoulliard
>>>>>>> Linkedin : 
>>>>>>> http://www.linkedin.com/in/****charlesmoulliard<http://www.linkedin.com/in/**charlesmoulliard>
>>>>>>> <http://www.**linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard> 
>>>>>>>
>>>>>>> Skype: cmoulliard
>>>>>>>
>>>>>>>
>>>>>>>   ------------------------------****----------------------------**
>>>>>> --**---------
>>>>>> To unsubscribe, e-mail: 
>>>>>> users-unsubscribe@felix.**apac**he.org<http://apache.org>
>>>>>> <us...@felix.apache.org> 
>>>>>>
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>> ------------------------------**------------------------------**--------- 
>>>
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@felix.**apache.org<us...@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: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 6/15/12 10:10 , Charles Moulliard wrote:
> Creating a test case is a bit complex except if I zip the project (Karaf
> server containing the code deployed) and send it ?

If you can get it to reproduce that way, then send it to me off list 
with the steps to reproduce it and I'll look into it.

-> richard

>
> On Fri, Jun 15, 2012 at 3:44 PM, Richard S. Hall<he...@ungoverned.org>wrote:
>
>> I'm not sure if this is related to Proxy creation or not. I do believe
>> there could be some issues with that. However, I think this issue is more
>> related to dynamic imports...that's just a guess.
>>
>> This still needs to be tested on 4.0.x, though...and I'll probably only
>> ever get to the bottom of it if we can get me to reproduce it.
>>
>> ->  richard
>>
>>
>> On 6/15/12 02:46 , Charles Moulliard wrote:
>>
>>> Hi Richard,
>>>
>>> Version of Felix and Karaf used are :
>>>
>>> Karaf
>>>    Karaf version               2.2.7
>>>    Karaf home
>>>   /Users/chmoulli/**MyApplications/apache-karaf-2.**2.7
>>>    Karaf base
>>>   /Users/chmoulli/**MyApplications/apache-karaf-2.**2.7
>>>    OSGi Framework              org.apache.felix.framework - 3.0.9
>>>
>>> JVM
>>>    Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
>>> 20.8-b03-424
>>>    Version                     1.6.0_33
>>>
>>> In our scenario, we use weld-osgi to create for each bundle a CDI
>>> container. The CDI container depending on the CDI annotations (@Inject,
>>> ...) discovered in the bundle will instantiate some new beans and add them
>>> to the class loader. In my case the bundle A = example has a reference to
>>> a
>>> class exported by a bundle B (= CdiCamelContext) and this class
>>> CdiCamelContext is created using java.lang.reflect.Proxy.****
>>> newProxyInstance().
>>>
>>> Remark, this class CdiCamelContext extends a CamelContext class exported
>>> by
>>> another bundle = C. The package B imports well the packages from C.
>>>
>>> Regards,
>>>
>>> Charles
>>>
>>>
>>>
>>>
>>>   On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall<he...@ungoverned.org>*
>>>> *wrote:
>>>>
>>>>   On 6/14/12 16:44 , Charles Moulliard wrote:
>>>>>   Hi,
>>>>>> What could be the reason why we get a NPE at the followoing line
>>>>>>
>>>>>>   Not sure. A similar issue was reported in:
>>>>>     https://issues.apache.org/****jira/browse/FELIX-3003<https://issues.apache.org/**jira/browse/FELIX-3003>
>>>>> <https:/**/issues.apache.org/jira/**browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>>>>>
>>>>> Can you reproduce this? That would make it a lot easier to track down.
>>>>>
>>>>> It is also not clear which version of the framework you are using...it
>>>>> doesn't appear to be 4.0.x.
>>>>>
>>>>> ->   richard
>>>>>
>>>>>
>>>>>
>>>>>   Caused by: java.lang.NullPointerException
>>>>>> at
>>>>>> org.apache.felix.framework.****resolver.ResolverImpl.****
>>>>>> permutateIfNeeded(*
>>>>>> *ResolverImpl.java:1156)
>>>>>> at
>>>>>> org.apache.felix.framework.****resolver.ResolverImpl.**
>>>>>> checkPackageSpaceConsistency(****ResolverImpl.java:1085)
>>>>>> at
>>>>>> org.apache.felix.framework.****resolver.ResolverImpl.resolve(****
>>>>>> ResolverImpl.java:171)
>>>>>> at org.apache.felix.framework.****Felix$FelixResolver.resolve(**
>>>>>> Felix.java:4103)
>>>>>> at
>>>>>> org.apache.felix.framework.****ModuleImpl.****searchDynamicImports(**
>>>>>> ModuleImpl.java:1412)
>>>>>> at
>>>>>> org.apache.felix.framework.****ModuleImpl.****
>>>>>> findClassOrResourceByDelegatio
>>>>>> **n(ModuleImpl.java:734)
>>>>>> at org.apache.felix.framework.****ModuleImpl.access$400(**
>>>>>> ModuleImpl.java:71)
>>>>>> at
>>>>>> org.apache.felix.framework.****ModuleImpl$ModuleClassLoader.****
>>>>>> loadClass(ModuleImpl.java:****1768)
>>>>>> at java.lang.ClassLoader.****loadClass(ClassLoader.java:****247)
>>>>>> at java.lang.Class.forName0(****Native Method)
>>>>>> at java.lang.Class.forName(Class.****java:247)
>>>>>> at java.lang.reflect.Proxy.****getProxyClass(Proxy.java:349)
>>>>>> at java.lang.reflect.Proxy.****newProxyInstance(Proxy.java:****581)
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Charles Moulliard
>>>>>>
>>>>>> Apache Committer
>>>>>>
>>>>>> Blog : http://cmoulliard.blogspot.com
>>>>>> Twitter : http://twitter.com/cmoulliard
>>>>>> Linkedin : http://www.linkedin.com/in/****charlesmoulliard<http://www.linkedin.com/in/**charlesmoulliard>
>>>>>> <http://www.**linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>>>>>> Skype: cmoulliard
>>>>>>
>>>>>>
>>>>>>   ------------------------------****----------------------------**
>>>>> --**---------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apac**he.org<http://apache.org>
>>>>> <us...@felix.apache.org>
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>>
>>>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@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: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by Charles Moulliard <cm...@gmail.com>.
Creating a test case is a bit complex except if I zip the project (Karaf
server containing the code deployed) and send it ?

On Fri, Jun 15, 2012 at 3:44 PM, Richard S. Hall <he...@ungoverned.org>wrote:

> I'm not sure if this is related to Proxy creation or not. I do believe
> there could be some issues with that. However, I think this issue is more
> related to dynamic imports...that's just a guess.
>
> This still needs to be tested on 4.0.x, though...and I'll probably only
> ever get to the bottom of it if we can get me to reproduce it.
>
> -> richard
>
>
> On 6/15/12 02:46 , Charles Moulliard wrote:
>
>> Hi Richard,
>>
>> Version of Felix and Karaf used are :
>>
>> Karaf
>>   Karaf version               2.2.7
>>   Karaf home
>>  /Users/chmoulli/**MyApplications/apache-karaf-2.**2.7
>>   Karaf base
>>  /Users/chmoulli/**MyApplications/apache-karaf-2.**2.7
>>   OSGi Framework              org.apache.felix.framework - 3.0.9
>>
>> JVM
>>   Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
>> 20.8-b03-424
>>   Version                     1.6.0_33
>>
>> In our scenario, we use weld-osgi to create for each bundle a CDI
>> container. The CDI container depending on the CDI annotations (@Inject,
>> ...) discovered in the bundle will instantiate some new beans and add them
>> to the class loader. In my case the bundle A = example has a reference to
>> a
>> class exported by a bundle B (= CdiCamelContext) and this class
>> CdiCamelContext is created using java.lang.reflect.Proxy.****
>> newProxyInstance().
>>
>> Remark, this class CdiCamelContext extends a CamelContext class exported
>> by
>> another bundle = C. The package B imports well the packages from C.
>>
>> Regards,
>>
>> Charles
>>
>>
>>
>>
>>  On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall<he...@ungoverned.org>*
>>> *wrote:
>>>
>>>  On 6/14/12 16:44 , Charles Moulliard wrote:
>>>>
>>>>  Hi,
>>>>>
>>>>> What could be the reason why we get a NPE at the followoing line
>>>>>
>>>>>  Not sure. A similar issue was reported in:
>>>>
>>>>    https://issues.apache.org/****jira/browse/FELIX-3003<https://issues.apache.org/**jira/browse/FELIX-3003>
>>>> <https:/**/issues.apache.org/jira/**browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>>>> >
>>>>
>>>>
>>>> Can you reproduce this? That would make it a lot easier to track down.
>>>>
>>>> It is also not clear which version of the framework you are using...it
>>>> doesn't appear to be 4.0.x.
>>>>
>>>> ->  richard
>>>>
>>>>
>>>>
>>>>  Caused by: java.lang.NullPointerException
>>>>> at
>>>>> org.apache.felix.framework.****resolver.ResolverImpl.****
>>>>> permutateIfNeeded(*
>>>>> *ResolverImpl.java:1156)
>>>>> at
>>>>> org.apache.felix.framework.****resolver.ResolverImpl.**
>>>>> checkPackageSpaceConsistency(****ResolverImpl.java:1085)
>>>>> at
>>>>> org.apache.felix.framework.****resolver.ResolverImpl.resolve(****
>>>>> ResolverImpl.java:171)
>>>>> at org.apache.felix.framework.****Felix$FelixResolver.resolve(**
>>>>> Felix.java:4103)
>>>>> at
>>>>> org.apache.felix.framework.****ModuleImpl.****searchDynamicImports(**
>>>>> ModuleImpl.java:1412)
>>>>> at
>>>>> org.apache.felix.framework.****ModuleImpl.****
>>>>> findClassOrResourceByDelegatio
>>>>> **n(ModuleImpl.java:734)
>>>>> at org.apache.felix.framework.****ModuleImpl.access$400(**
>>>>> ModuleImpl.java:71)
>>>>> at
>>>>> org.apache.felix.framework.****ModuleImpl$ModuleClassLoader.****
>>>>> loadClass(ModuleImpl.java:****1768)
>>>>> at java.lang.ClassLoader.****loadClass(ClassLoader.java:****247)
>>>>> at java.lang.Class.forName0(****Native Method)
>>>>> at java.lang.Class.forName(Class.****java:247)
>>>>> at java.lang.reflect.Proxy.****getProxyClass(Proxy.java:349)
>>>>> at java.lang.reflect.Proxy.****newProxyInstance(Proxy.java:****581)
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Charles Moulliard
>>>>>
>>>>> Apache Committer
>>>>>
>>>>> Blog : http://cmoulliard.blogspot.com
>>>>> Twitter : http://twitter.com/cmoulliard
>>>>> Linkedin : http://www.linkedin.com/in/****charlesmoulliard<http://www.linkedin.com/in/**charlesmoulliard>
>>>>> <http://www.**linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>>>>> >
>>>>> Skype: cmoulliard
>>>>>
>>>>>
>>>>>  ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apac**he.org<http://apache.org>
>>>> <us...@felix.apache.org>
>>>> >
>>>>
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by "Richard S. Hall" <he...@ungoverned.org>.
I'm not sure if this is related to Proxy creation or not. I do believe 
there could be some issues with that. However, I think this issue is 
more related to dynamic imports...that's just a guess.

This still needs to be tested on 4.0.x, though...and I'll probably only 
ever get to the bottom of it if we can get me to reproduce it.

-> richard

On 6/15/12 02:46 , Charles Moulliard wrote:
> Hi Richard,
>
> Version of Felix and Karaf used are :
>
> Karaf
>    Karaf version               2.2.7
>    Karaf home
>   /Users/chmoulli/MyApplications/apache-karaf-2.2.7
>    Karaf base
>   /Users/chmoulli/MyApplications/apache-karaf-2.2.7
>    OSGi Framework              org.apache.felix.framework - 3.0.9
>
> JVM
>    Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
> 20.8-b03-424
>    Version                     1.6.0_33
>
> In our scenario, we use weld-osgi to create for each bundle a CDI
> container. The CDI container depending on the CDI annotations (@Inject,
> ...) discovered in the bundle will instantiate some new beans and add them
> to the class loader. In my case the bundle A = example has a reference to a
> class exported by a bundle B (= CdiCamelContext) and this class
> CdiCamelContext is created using java.lang.reflect.Proxy.**newProxyInstance().
> Remark, this class CdiCamelContext extends a CamelContext class exported by
> another bundle = C. The package B imports well the packages from C.
>
> Regards,
>
> Charles
>
>
>
>
>> On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall<he...@ungoverned.org>wrote:
>>
>>> On 6/14/12 16:44 , Charles Moulliard wrote:
>>>
>>>> Hi,
>>>>
>>>> What could be the reason why we get a NPE at the followoing line
>>>>
>>> Not sure. A similar issue was reported in:
>>>
>>>     https://issues.apache.org/**jira/browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>>>
>>> Can you reproduce this? That would make it a lot easier to track down.
>>>
>>> It is also not clear which version of the framework you are using...it
>>> doesn't appear to be 4.0.x.
>>>
>>> ->  richard
>>>
>>>
>>>
>>>> Caused by: java.lang.NullPointerException
>>>> at
>>>> org.apache.felix.framework.**resolver.ResolverImpl.**permutateIfNeeded(*
>>>> *ResolverImpl.java:1156)
>>>> at
>>>> org.apache.felix.framework.**resolver.ResolverImpl.**
>>>> checkPackageSpaceConsistency(**ResolverImpl.java:1085)
>>>> at
>>>> org.apache.felix.framework.**resolver.ResolverImpl.resolve(**
>>>> ResolverImpl.java:171)
>>>> at org.apache.felix.framework.**Felix$FelixResolver.resolve(**
>>>> Felix.java:4103)
>>>> at
>>>> org.apache.felix.framework.**ModuleImpl.**searchDynamicImports(**
>>>> ModuleImpl.java:1412)
>>>> at
>>>> org.apache.felix.framework.**ModuleImpl.**findClassOrResourceByDelegatio
>>>> **n(ModuleImpl.java:734)
>>>> at org.apache.felix.framework.**ModuleImpl.access$400(**
>>>> ModuleImpl.java:71)
>>>> at
>>>> org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>>>> loadClass(ModuleImpl.java:**1768)
>>>> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
>>>> at java.lang.Class.forName0(**Native Method)
>>>> at java.lang.Class.forName(Class.**java:247)
>>>> at java.lang.reflect.Proxy.**getProxyClass(Proxy.java:349)
>>>> at java.lang.reflect.Proxy.**newProxyInstance(Proxy.java:**581)
>>>>
>>>> Regards,
>>>>
>>>> Charles Moulliard
>>>>
>>>> Apache Committer
>>>>
>>>> Blog : http://cmoulliard.blogspot.com
>>>> Twitter : http://twitter.com/cmoulliard
>>>> Linkedin : http://www.linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>>>> Skype: cmoulliard
>>>>
>>>>
>>> ------------------------------**------------------------------**---------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@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: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by Charles Moulliard <cm...@gmail.com>.
Here is the code from where the error comes from

   @Override
    public Object create(CreationalContext creationalContext) {
        logger.trace("Entering OSGiServiceBean : create() with parameter");
        try {
            BundleContext context = ctx;
            if (context == null) {
                context = FrameworkUtil.getBundle(injectionPoint.getMember()
                        .getDeclaringClass()).getBundleContext();
            }
            DynamicServiceHandler handler =
                                  new DynamicServiceHandler(context,
                                                            ((Class)
type).getName(),
                                                            filter,
                                                            qualifiers,
                                                            timeout);
            Object proxy =
Proxy.newProxyInstance(getClass().getClassLoader(),
                                                  new Class[]
{getBeanClass()},
                                                  handler);
////////////////// Error is generated when we call newProxyInstance
            //memorize if the handler has been allready stored
            if (handlers.containsKey(proxy)) {
                handler.setStored(true);
            } else {
                //map.put() need a correct hashCode() method to use
                //see DynamicServiceHandler
                handlers.put(proxy, handler);
                handler.setStored(true);
            }
            logger.debug("New proxy for {} created", this);
            return proxy;
        }
        catch(Exception e) {
            logger.error("Unable to instantiate {} due to {}", this, e);
            throw new CreationException(e); // NPE is reported here
        }
    }

On Fri, Jun 15, 2012 at 8:46 AM, Charles Moulliard <cm...@gmail.com>wrote:

> Hi Richard,
>
> Version of Felix and Karaf used are :
>
> Karaf
>   Karaf version               2.2.7
>   Karaf home
>  /Users/chmoulli/MyApplications/apache-karaf-2.2.7
>   Karaf base
>  /Users/chmoulli/MyApplications/apache-karaf-2.2.7
>   OSGi Framework              org.apache.felix.framework - 3.0.9
>
> JVM
>   Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
> 20.8-b03-424
>   Version                     1.6.0_33
>
> In our scenario, we use weld-osgi to create for each bundle a CDI
> container. The CDI container depending on the CDI annotations (@Inject,
> ...) discovered in the bundle will instantiate some new beans and add them
> to the class loader. In my case the bundle A = example has a reference to a
> class exported by a bundle B (= CdiCamelContext) and this class
> CdiCamelContext is created using java.lang.reflect.Proxy.**newProxyInstance().
> Remark, this class CdiCamelContext extends a CamelContext class exported by
> another bundle = C. The package B imports well the packages from C.
>
> Regards,
>
> Charles
>
>
>
>
>> On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall <he...@ungoverned.org>wrote:
>>
>>> On 6/14/12 16:44 , Charles Moulliard wrote:
>>>
>>>> Hi,
>>>>
>>>> What could be the reason why we get a NPE at the followoing line
>>>>
>>>
>>> Not sure. A similar issue was reported in:
>>>
>>>    https://issues.apache.org/**jira/browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>>>
>>> Can you reproduce this? That would make it a lot easier to track down.
>>>
>>> It is also not clear which version of the framework you are using...it
>>> doesn't appear to be 4.0.x.
>>>
>>> -> richard
>>>
>>>
>>>
>>>> Caused by: java.lang.NullPointerException
>>>> at
>>>> org.apache.felix.framework.**resolver.ResolverImpl.**permutateIfNeeded(
>>>> **ResolverImpl.java:1156)
>>>> at
>>>> org.apache.felix.framework.**resolver.ResolverImpl.**
>>>> checkPackageSpaceConsistency(**ResolverImpl.java:1085)
>>>> at
>>>> org.apache.felix.framework.**resolver.ResolverImpl.resolve(**
>>>> ResolverImpl.java:171)
>>>> at org.apache.felix.framework.**Felix$FelixResolver.resolve(**
>>>> Felix.java:4103)
>>>> at
>>>> org.apache.felix.framework.**ModuleImpl.**searchDynamicImports(**
>>>> ModuleImpl.java:1412)
>>>> at
>>>> org.apache.felix.framework.**ModuleImpl.**
>>>> findClassOrResourceByDelegatio**n(ModuleImpl.java:734)
>>>> at org.apache.felix.framework.**ModuleImpl.access$400(**
>>>> ModuleImpl.java:71)
>>>> at
>>>> org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>>>> loadClass(ModuleImpl.java:**1768)
>>>> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
>>>> at java.lang.Class.forName0(**Native Method)
>>>> at java.lang.Class.forName(Class.**java:247)
>>>> at java.lang.reflect.Proxy.**getProxyClass(Proxy.java:349)
>>>> at java.lang.reflect.Proxy.**newProxyInstance(Proxy.java:**581)
>>>>
>>>> Regards,
>>>>
>>>> Charles Moulliard
>>>>
>>>> Apache Committer
>>>>
>>>> Blog : http://cmoulliard.blogspot.com
>>>> Twitter : http://twitter.com/cmoulliard
>>>> Linkedin : http://www.linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>>>> Skype: cmoulliard
>>>>
>>>>
>>> ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>

Re: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Richard,

Version of Felix and Karaf used are :

Karaf
  Karaf version               2.2.7
  Karaf home
 /Users/chmoulli/MyApplications/apache-karaf-2.2.7
  Karaf base
 /Users/chmoulli/MyApplications/apache-karaf-2.2.7
  OSGi Framework              org.apache.felix.framework - 3.0.9

JVM
  Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
20.8-b03-424
  Version                     1.6.0_33

In our scenario, we use weld-osgi to create for each bundle a CDI
container. The CDI container depending on the CDI annotations (@Inject,
...) discovered in the bundle will instantiate some new beans and add them
to the class loader. In my case the bundle A = example has a reference to a
class exported by a bundle B (= CdiCamelContext) and this class
CdiCamelContext is created using java.lang.reflect.Proxy.**newProxyInstance().
Remark, this class CdiCamelContext extends a CamelContext class exported by
another bundle = C. The package B imports well the packages from C.

Regards,

Charles




> On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall <he...@ungoverned.org>wrote:
>
>> On 6/14/12 16:44 , Charles Moulliard wrote:
>>
>>> Hi,
>>>
>>> What could be the reason why we get a NPE at the followoing line
>>>
>>
>> Not sure. A similar issue was reported in:
>>
>>    https://issues.apache.org/**jira/browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>>
>> Can you reproduce this? That would make it a lot easier to track down.
>>
>> It is also not clear which version of the framework you are using...it
>> doesn't appear to be 4.0.x.
>>
>> -> richard
>>
>>
>>
>>> Caused by: java.lang.NullPointerException
>>> at
>>> org.apache.felix.framework.**resolver.ResolverImpl.**permutateIfNeeded(*
>>> *ResolverImpl.java:1156)
>>> at
>>> org.apache.felix.framework.**resolver.ResolverImpl.**
>>> checkPackageSpaceConsistency(**ResolverImpl.java:1085)
>>> at
>>> org.apache.felix.framework.**resolver.ResolverImpl.resolve(**
>>> ResolverImpl.java:171)
>>> at org.apache.felix.framework.**Felix$FelixResolver.resolve(**
>>> Felix.java:4103)
>>> at
>>> org.apache.felix.framework.**ModuleImpl.**searchDynamicImports(**
>>> ModuleImpl.java:1412)
>>> at
>>> org.apache.felix.framework.**ModuleImpl.**findClassOrResourceByDelegatio
>>> **n(ModuleImpl.java:734)
>>> at org.apache.felix.framework.**ModuleImpl.access$400(**
>>> ModuleImpl.java:71)
>>> at
>>> org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>>> loadClass(ModuleImpl.java:**1768)
>>> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
>>> at java.lang.Class.forName0(**Native Method)
>>> at java.lang.Class.forName(Class.**java:247)
>>> at java.lang.reflect.Proxy.**getProxyClass(Proxy.java:349)
>>> at java.lang.reflect.Proxy.**newProxyInstance(Proxy.java:**581)
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>>
>>> Apache Committer
>>>
>>> Blog : http://cmoulliard.blogspot.com
>>> Twitter : http://twitter.com/cmoulliard
>>> Linkedin : http://www.linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>>> Skype: cmoulliard
>>>
>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Richard,

Version of Felix and Karaf used are :

Karaf
  Karaf version               2.2.7
  Karaf home
 /Users/chmoulli/MyApplications/apache-karaf-2.2.7
  Karaf base
 /Users/chmoulli/MyApplications/apache-karaf-2.2.7
  OSGi Framework              org.apache.felix.framework - 3.0.9

JVM
  Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version
20.8-b03-424
  Version                     1.6.0_33

In our scenario, we use weld-osgi to create for each bundle

On Thu, Jun 14, 2012 at 10:54 PM, Richard S. Hall <he...@ungoverned.org>wrote:

> On 6/14/12 16:44 , Charles Moulliard wrote:
>
>> Hi,
>>
>> What could be the reason why we get a NPE at the followoing line
>>
>
> Not sure. A similar issue was reported in:
>
>    https://issues.apache.org/**jira/browse/FELIX-3003<https://issues.apache.org/jira/browse/FELIX-3003>
>
> Can you reproduce this? That would make it a lot easier to track down.
>
> It is also not clear which version of the framework you are using...it
> doesn't appear to be 4.0.x.
>
> -> richard
>
>
>
>> Caused by: java.lang.NullPointerException
>> at
>> org.apache.felix.framework.**resolver.ResolverImpl.**permutateIfNeeded(**
>> ResolverImpl.java:1156)
>> at
>> org.apache.felix.framework.**resolver.ResolverImpl.**
>> checkPackageSpaceConsistency(**ResolverImpl.java:1085)
>> at
>> org.apache.felix.framework.**resolver.ResolverImpl.resolve(**
>> ResolverImpl.java:171)
>> at org.apache.felix.framework.**Felix$FelixResolver.resolve(**
>> Felix.java:4103)
>> at
>> org.apache.felix.framework.**ModuleImpl.**searchDynamicImports(**
>> ModuleImpl.java:1412)
>> at
>> org.apache.felix.framework.**ModuleImpl.**findClassOrResourceByDelegatio*
>> *n(ModuleImpl.java:734)
>> at org.apache.felix.framework.**ModuleImpl.access$400(**
>> ModuleImpl.java:71)
>> at
>> org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>> loadClass(ModuleImpl.java:**1768)
>> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
>> at java.lang.Class.forName0(**Native Method)
>> at java.lang.Class.forName(Class.**java:247)
>> at java.lang.reflect.Proxy.**getProxyClass(Proxy.java:349)
>> at java.lang.reflect.Proxy.**newProxyInstance(Proxy.java:**581)
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Apache Committer
>>
>> Blog : http://cmoulliard.blogspot.com
>> Twitter : http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/**charlesmoulliard<http://www.linkedin.com/in/charlesmoulliard>
>> Skype: cmoulliard
>>
>>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: NPE for org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 6/14/12 16:44 , Charles Moulliard wrote:
> Hi,
>
> What could be the reason why we get a NPE at the followoing line

Not sure. A similar issue was reported in:

     https://issues.apache.org/jira/browse/FELIX-3003

Can you reproduce this? That would make it a lot easier to track down.

It is also not clear which version of the framework you are using...it 
doesn't appear to be 4.0.x.

-> richard

>
> Caused by: java.lang.NullPointerException
> at
> org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded(ResolverImpl.java:1156)
> at
> org.apache.felix.framework.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:1085)
> at
> org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:171)
> at org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:4103)
> at
> org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1412)
> at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:734)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at java.lang.reflect.Proxy.getProxyClass(Proxy.java:349)
> at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
>
> Regards,
>
> Charles Moulliard
>
> Apache Committer
>
> Blog : http://cmoulliard.blogspot.com
> Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> Skype: cmoulliard
>

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