Hi Robert Thanks for the response.
Type Cast was done to convert from DataObject to String which we will refactor. Surprisingly this code was working until Boron. Wondering how OSGI allows to have two different implementations registered with same set of interfaces and filter and what would be the purpose of doing like this? Thanks Vikram -----Original Message----- From: Robert Varga <n...@hq.sk> Sent: Monday, July 29, 2019 5:25 PM To: Vikram Darsi <vda...@advaoptical.com>; mdsal-...@lists.opendaylight.org; controller-dev@lists.opendaylight.org Subject: Re: [controller-dev] Same service exposed twice with the same odl filter External email: [n...@hq.sk] ...................................................................... On 29/07/2019 13:03, Vikram Darsi wrote: > Hi Team > > > > Distribution : ODL Neon SR1 > > > > Installed "odl-netconf-all" feature and ran "service:list" > > > > [org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory, > org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSeri > alizer] > > ---------------------------------------------------------------------- > ---------------------------------------------------------------------- > -------- > > service.id = 224 > > osgi.service.blueprint.compname = mappingCodec > > service.bundleid = 125 > > service.scope = bundle > > type = default > > Provided by : > > org.opendaylight.controller.sal-binding-broker-impl (125) > > > > [org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory, > org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSeri > alizer] > > ---------------------------------------------------------------------- > ---------------------------------------------------------------------- > -------- > > service.id = 169 > > osgi.service.blueprint.compname = mappingCodec > > service.bundleid = 144 > > service.scope = bundle > > type = default > > Provided by : > > mdsal-binding-dom-adapter (144) > > > > > > Is this expected? Yes. > When below statement is executed, we are getting ClassCastException > > > > BindingNormalizedNodeCodecRegistrycodecReg= > ((BindingToNormalizedNodeCodec)/codecRegistry/).getCodecRegistry(); Yes, obviously. You are attempting to cast a service reference to an implementation class -- I suspect that blows up on the reference being a proxy. Why would you even need that cast? Regards, Robert _______________________________________________ controller-dev mailing list controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev