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<[email protected]>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<[email protected]>
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to