This indeed looks like you have the interface package in multiple bundles.
Please check your Manifests and the contents of the jars.
headers <bundleid> should help you.
Christian
On 14.07.2014 13:43, Jens J Parappallil wrote:
Hi,
I am using karaf 3.0.1 with osgi framework equinox . I have a simple
service getting exposed via interface
(com.ibsplc.icx.mx.core.ICXIdentity ) from one bundle and being looked
up from another. This was working initially and now all of a sudden
this service is not getting picked up .
This is the output from diag and subsequent service:list command
karaf@icx-node $diag 222
iCx Message Exchange Inbound Adaptor (222)
------------------------------------------
Status: GracePeriod
Blueprint
14/7/14 4:53 PM
Missing dependencies:
(objectClass=com.ibsplc.icx.mx.core.ICXIdentity)
Bundle 222 is waiting for the service but the same is already
published ...
karaf@icx-node $service:list com.ibsplc.icx.mx.core.ICXIdentity
[com.ibsplc.icx.mx.core.ICXIdentity]
------------------------------------
osgi.service.blueprint.compname = identityProvider
type = iCxIdentity
domain = icx
service.id = 982
Provided by :
iCx Message Exchange Core (220)
I switched the Osgi framework to felix which resulted in classcast
exeception on the proxy
Caused by: java.lang.ClassCastException:
Proxyf21e058d_4048_4147_b33d_e304803b636a cannot be cast to
com.ibsplc.icx.mx.core.ICXIdentity
at
com.ibsplc.icx.mx.inbound.TestInit.start(TestInit.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.7.0_03]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_03]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_03]
This seems to be a classloader accessibility issue but what is causing
this, both the interface and impl class are present only in one bundle
( 220 ) .
Please help J
Thanks
Jens
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com