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 06:19 Go to next message
Yousef Fadila is currently offline Yousef Fadila
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 04: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 08:08 Go to previous messageGo to next message
Yousef Fadila is currently offline Yousef Fadila
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 10: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 10:50 Go to previous messageGo to next message
Yousef Fadila is currently offline Yousef Fadila
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 11:08 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
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 06:18 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
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 04:48 Go to previous message
Yousef Fadila is currently offline Yousef Fadila
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: Sat Aug 30 18:23:55 EDT 2014

Powered by FUDForum. Page generated in 0.03103 seconds