felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conreaux, Patrick" <patrick.conre...@amd.com>
Subject Embedded Felix ScrService ClassCastException
Date Wed, 16 Nov 2011 20:35:36 GMT
Hi,

I have encountered the following ClassCastException while attempting to cast the ScrService
object (from a ServiceTracker) in my host app.
Following the documented procedure, I have put the SCR jar on the host app classpath and exported
the org.apache.felix.scr
package via the org.osgi.framework.system.packages.extra property.

java.lang.ClassCastException: org.apache.felix.scr.impl.config.ConfigurationComponentRegistry
cannot be cast to org.apache.felix.scr.ScrService

Using a similar approach, I can successfully obtain and cast the EventAdmin service.
Also, I am successful if I instead list the the org.apache.felix.scr package in the org.osgi.framework.bootdelegation
property.
However, this is not the desirable solution as it breaks modularity.

Any ideas?

Installed bundles are the following:
org.apache.felix.shell-1.2.0.jar
org.apache.felix.scr-1.6.0.jar
org.apache.felix.configadmin-1.2.4.jar
org.apache.felix.eventadmin-1.2.14.jar

Cheers,
Patrick



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message