Class loading issue in apache aries blueprint context

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Class loading issue in apache aries blueprint context

Lim, See Peng

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 

Reply | Threaded
Open this post in threaded view
|

Re: Class loading issue in apache aries blueprint context

Grzegorz Grzybek
Hello

Are you running your blueprint inside full OSGi runtime or via camel-test-blueprint? In latter case you're using felix-connect (previously known as PojoSR), which doesn't use full BundleClassLoaders.

regards
Grzegorz

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 


Reply | Threaded
Open this post in threaded view
|

RE: Class loading issue in apache aries blueprint context

Lim, See Peng

Hi Grzegorz,

 

I am running inside full OSGI runtime, is that mean it won’t use BundleClassLoaders?

 

Regards,

See Peng

 

From: Grzegorz Grzybek [mailto:[hidden email]]
Sent: Tuesday, July 12, 2016 7:35 PM
To: [hidden email]
Subject: Re: Class loading issue in apache aries blueprint context

 

Hello

Are you running your blueprint inside full OSGi runtime or via camel-test-blueprint? In latter case you're using felix-connect (previously known as PojoSR), which doesn't use full BundleClassLoaders.

regards

Grzegorz

 

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Class loading issue in apache aries blueprint context

Grzegorz Grzybek
Hello

Hmm. Maybe you added your JAR to initial classpath? Like KARAF_HOME/lib directory? How did you install your bundle with blueprint descriptor?

regards
Grzegorz

2016-07-14 2:42 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi Grzegorz,

 

I am running inside full OSGI runtime, is that mean it won’t use BundleClassLoaders?

 

Regards,

See Peng

 

From: Grzegorz Grzybek [mailto:[hidden email]]
Sent: Tuesday, July 12, 2016 7:35 PM
To: [hidden email]
Subject: Re: Class loading issue in apache aries blueprint context

 

Hello

Are you running your blueprint inside full OSGi runtime or via camel-test-blueprint? In latter case you're using felix-connect (previously known as PojoSR), which doesn't use full BundleClassLoaders.

regards

Grzegorz

 

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 

 


Reply | Threaded
Open this post in threaded view
|

RE: Class loading issue in apache aries blueprint context

Matt Madhavan
In reply to this post by Lim, See Peng

Not sure why am I still getting mails from this post!

Great idea, but OSGi, is dead:(

Any ideas?


On Jul 13, 2016 7:43 PM, "Lim, See Peng" <[hidden email]> wrote:

Hi Grzegorz,

 

I am running inside full OSGI runtime, is that mean it won’t use BundleClassLoaders?

 

Regards,

See Peng

 

From: Grzegorz Grzybek [mailto:[hidden email]]
Sent: Tuesday, July 12, 2016 7:35 PM
To: [hidden email]
Subject: Re: Class loading issue in apache aries blueprint context

 

Hello

Are you running your blueprint inside full OSGi runtime or via camel-test-blueprint? In latter case you're using felix-connect (previously known as PojoSR), which doesn't use full BundleClassLoaders.

regards

Grzegorz

 

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Class loading issue in apache aries blueprint context

Grzegorz Grzybek
@Matt - you should find an unsubscribe linke somewhere ;)

Believe me - there are people still using RPC/Encoded style web services. Or Corba.

~Grzegorz

2016-07-14 7:36 GMT+02:00 Matt Madhavan <[hidden email]>:

Not sure why am I still getting mails from this post!

Great idea, but OSGi, is dead:(

Any ideas?


On Jul 13, 2016 7:43 PM, "Lim, See Peng" <[hidden email]> wrote:

Hi Grzegorz,

 

I am running inside full OSGI runtime, is that mean it won’t use BundleClassLoaders?

 

Regards,

See Peng

 

From: Grzegorz Grzybek [mailto:[hidden email]]
Sent: Tuesday, July 12, 2016 7:35 PM
To: [hidden email]
Subject: Re: Class loading issue in apache aries blueprint context

 

Hello

Are you running your blueprint inside full OSGi runtime or via camel-test-blueprint? In latter case you're using felix-connect (previously known as PojoSR), which doesn't use full BundleClassLoaders.

regards

Grzegorz

 

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 

 


Reply | Threaded
Open this post in threaded view
|

Re: Class loading issue in apache aries blueprint context

Guillaume Nodet-2
In reply to this post by Lim, See Peng
Blueprint does not set the thread context class loader.
You can use the class loader of a class to load resources instead, or manually set the thread context class loader to that of the class being loaded.

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 




--
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration


Reply | Threaded
Open this post in threaded view
|

Re: Class loading issue in apache aries blueprint context

Matt Madhavan

How the fuck I get out of this email crap? Believe me I worked hard for OSGI more than all you craps convinced!


On Jul 14, 2016 1:52 AM, "Guillaume Nodet" <[hidden email]> wrote:
Blueprint does not set the thread context class loader.
You can use the class loader of a class to load resources instead, or manually set the thread context class loader to that of the class being loaded.

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 




--
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration


Reply | Threaded
Open this post in threaded view
|

Re: Class loading issue in apache aries blueprint context

Grzegorz Grzybek
if [hidden email] / [hidden email] doesn't work you should just mark as spam this address.

~Grzegorz

2016-07-14 10:10 GMT+02:00 Matt Madhavan <[hidden email]>:

How the fuck I get out of this email crap? Believe me I worked hard for OSGI more than all you craps convinced!


On Jul 14, 2016 1:52 AM, "Guillaume Nodet" <[hidden email]> wrote:
Blueprint does not set the thread context class loader.
You can use the class loader of a class to load resources instead, or manually set the thread context class loader to that of the class being loaded.

2016-07-12 12:53 GMT+02:00 Lim, See Peng <[hidden email]>:

Hi all,

 

We noticed that when a bean is initialized in apache aries blueprint context, it will use the LauncherAppClassLoader instead of bundle class loader , hence it can’t access resources such as classes or file in a bundle.

 

I am trying to check the apache aries trunk source code and found out there is a deprecated class “org.apache.aries.blueprint.utils.BundleDelegatingClassLoader”. Is this class used to delegating system class loader to bundle class loader?  How can we make a bean will always initialized using the bundle classloader in blueprint context?

 

Really appreciate your help on this issue.

 

Thanks.

 

Regards,

See Peng

 




--
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration