Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cosmos-dev] problemwithusingautowireandComposableManagedCapabilitySettogetherwithnew annotation

Hubert,

 

I committed code last night that should fix your duplicate capability issue. I brought up your MDR sample with no problems, but I didn’t know what to start to test the registration. If you could give it a shot and/or tell me how to test your implementation I’d appreciate it.

 

Cheers,

Joel

 

-----Original Message-----
From: cosmos-dev-bounces@xxxxxxxxxxx [mailto:cosmos-dev-bounces@xxxxxxxxxxx] On Behalf Of Hubert H Leung
Sent: Friday, February 01, 2008 2:22 PM
To: Cosmos Dev
Subject: RE: [cosmos-dev] problemwithusingautowireandComposableManagedCapabilitySettogetherwithnew annotation

 


Hi Joel,

Thanks for you help.  With you new fix, I don't get the classloader problem any more.  However, my description capability is still not working.  I'm getting a DuplicateCapability error.  

Caused by: java.lang.RuntimeException: [ID = 'DuplicateCapability'] The property '{http://docs.oasis-open.org/wsdm/muws2-2.xsd}Version' is already implemented by capability 'http://docs.oasis-open.org/wsdm/muws/capabilities/Description', but a second capability, 'http://docs.oasis-open.org/wsdm/muws2-2.xsd', is being associated with it as well.

With a quick tracing, I find that in bindContribution method of WSDMBindingService, getWSDLDocument() is called twice.  Once by compileCapabilties(), and once in binding.initialize().  
The Description capabiltiy may be added twice in the wsdl.  Can you try to reproduce it?


I acknowledge the loading order of bundles is an issue, but is unrelated to the problem about the Description capability.  The autowire annotation didn't work before because the classloader exception was thrown before processAutowire was executed.  The autowire problem should be fine.  

Thanks,
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382


"Hawkins, Joel" <Joel.Hawkins@xxxxxxxxxxxxx>
Sent by: cosmos-dev-bounces@xxxxxxxxxxx

02/01/2008 01:15 PM

Please respond to
Cosmos Dev <cosmos-dev@xxxxxxxxxxx>

To

"Cosmos Dev" <cosmos-dev@xxxxxxxxxxx>

cc

 

Subject

RE: [cosmos-dev]        problemwithusingautowireandComposableManagedCapabilitySet        togetherwithnew annotation

 

 

 




Hubert, I’ve fixed the classloader problem (thanks for finding that one!), but your real issue is caused by listening only for the contribution manager, and not the WSDM binding. You’re registering your class prior to the WSDM binding being available, so the autowire can’t provide you the binding because it doesn’t exist yet.

If you use declarative services, this is an easy issue to resolve. If you want to do it programmatically, you’ll need to listen for the WSDM binding service, and then resolve the contribution manager. This is safe, however, since the WSDM binding service doesn’t get created until the contribution manager is available.

If this isn’t clear, let me know and I’ll try and elaborate. If you’d like, I could also make the required code changes for you, but you can probably do that every bit as fast as I can!

Cheers

The program fails at line 193 of org.eclipse.cosmos.me.management.common.util.ManagementProxyFactory.  Here is the stacktrace:
Failed to register data manager with contribution manager.

java.lang.IllegalArgumentException
: interface org.eclipse.cosmos.me.management.provisional.wsdm.capabilities.DescriptionCapability is not visible from class loader
       at java.lang.reflect.Proxy.getProxyClass(
Proxy.java:353)
       at java.lang.reflect.Proxy.newProxyInstance(
Proxy.java:581)
       at org.eclipse.cosmos.me.management.common.util.ManagementProxyFactory.getManagedProxy(
ManagementProxyFactory.java:193)
       at org.eclipse.cosmos.me.management.osgi.ContributionManagerImpl.manage(
ContributionManagerImpl.java:73)
       at org.eclipse.cosmos.dc.dataManager.impl.AbstractDataManagerActivator.serviceChanged(
AbstractDataManagerActivator.java:92)

 


The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it
.
_______________________________________________
cosmos-dev mailing list
cosmos-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cosmos-dev


Back to the top