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


Reply via email to