Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » how to prevent double loading of blueprint extender (one loaded in kernel and one in user)
how to prevent double loading of blueprint extender (one loaded in kernel and one in user) [message #954880] Tue, 23 October 2012 10:19 Go to next message
Yousef Fadila is currently offline Yousef FadilaFriend
Messages: 14
Registered: October 2012
Junior Member
Hi All.

I face a lot of "class Cast exception" and type incompatible issues. when trying to inject blueprintcontainer and blueprintcontainer context caused, I assume, because of double loading to the blueprint extender interface in both kernel and user regions.

Some I solve by moving to reflection,(Inject to type object to bypass casting) but I want a solution for all. I can't change all jars to reflection.

for example now I have this problem when deploying the logger bundle.

[2012-10-23 19:33:09.424] INFO fs-watcher o.e.g.blueprint.extender.internal.activator.LifecycleManager Bundle logger is not type compatible with extender gemini-blueprint-extender; ignoring bundle...

Here is the bean created in its blueprint
<bean id="loggerManagerFactory" class="com.xxx.xxx.infra.core.logger.common.DefaultLoggerManagerFactory" >
<property name="loggerPrototypeId" value="logger-mgr-impl"/>
<property name="blueprintContainer" ref="blueprintContainer"/>
</bean>

<bean id="logger-mgr-impl" class="com.xxx.xxx.infra.core.logger.log4j.manager.Log4jLoggerManager" scope="prototype">
<property name="bundleContext" ref="blueprintBundleContext"/>
</bean>



any advice how can I solve this once for all jars?


Thanks
Fadila Yousef

[Updated on: Wed, 07 November 2012 09:56]

Report message to a moderator

Re: how to prevent double loading of blueprint extender (one loaded in kernel and one in user) [message #954983 is a reply to message #954880] Tue, 23 October 2012 12:08 Go to previous messageGo to next message
Yousef Fadila is currently offline Yousef FadilaFriend
Messages: 14
Registered: October 2012
Junior Member
to make it clear. this fail and other class cast exceptions fails I face appear only in virgo env.

In standalone equinox without the all works well.

Any advice is appreciated.

BR
Yousef

[Updated on: Tue, 23 October 2012 14:06]

Report message to a moderator

Re: how to prevent double loading of blueprint extender (one loaded in kernel and one in user) [message #955142 is a reply to message #954880] Tue, 23 October 2012 14:50 Go to previous messageGo to next message
Yousef Fadila is currently offline Yousef FadilaFriend
Messages: 14
Registered: October 2012
Junior Member

I try to uninstall the blueprint from kernel using the console and then deploy the jars. but it doesn't work

now I am not sure even if the double loading of blueprint is the source of the problem.

any idea what can cause to this issue.

Re: how to prevent double loading of blueprint extender (one loaded in kernel and one in user) [message #964488 is a reply to message #955142] Tue, 30 October 2012 15:08 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The kernel is designed to run independently of the user region and has always run a Spring DM (and more recently Gemini Blueprint) extender without apparently causing problems for users.

I wonder if the logging side of the bundle is causing the problem?

In such situations, I have used a debugger to examine the code that issues the type incompatibility message. Usually at that point you can look at the various classes involved and their defining class loaders (by watching the expression xxx.getClass().getClassLoader()) and see which bundles are involved. Hope that helps!
Re: how to prevent double loading of blueprint extender (one loaded in kernel and one in user) [message #968260 is a reply to message #964488] Fri, 02 November 2012 10:18 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Hi Yousef - if you can provide a simple bundle that shows this problem I'd be interested in running it in Virgo kernel. No-one has reported problems like you are seeing in the past. I'm wondering if you have edited the user region properties to change the isolation of the kernel...
Re: how to prevent double loading of blueprint extender (one loaded in kernel and one in user) [message #974751 is a reply to message #968260] Wed, 07 November 2012 09:48 Go to previous message
Yousef Fadila is currently offline Yousef FadilaFriend
Messages: 14
Registered: October 2012
Junior Member
Thanks for your help, I look @ xxx.getClass().getClassLoader() and see that they have different class loaders,

I make a sample app - all what its do is injecting the blueprint container. nothing else.

download here
http://host4il.com/virgo/blueprint-test.zip

let me know if it works for you.

Thanks again
Yousef
Previous Topic:Can I import and export services when I'm using Virgo Snaps?
Next Topic:Deploy WAR to VTS
Goto Forum:
  


Current Time: Fri Apr 19 15:27:32 GMT 2024

Powered by FUDForum. Page generated in 0.01474 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top