Logan Barron wrote:
Hello Friends,I am currently working on an OSGi application and would like to move to Felix as the framework. I am using OSGi for the back-end, talking to a Rails front end. This works just fine under the *Knopflerfish* framework, but when moving to Felix, using the same bundles, with the same Manifests, the bundles are not starting; they are throwing ClassCastExceptions (see below)... Any ideas on why a ClassCastException would be thrown on the Activator??? -> install file:/usr/opt/bundles/reporter_main.jar Bundle ID: 15 -> start 15 DEBUG: WIRE: 15.0 -> org.apache.log4j -> 13.0 DEBUG: WIRE: 15.0 -> org.osgi.service.startlevel -> 0 org.osgi.framework.BundleException: Activator start error. at org.apache.felix.framework.Felix._startBundle(Felix.java:1629) at org.apache.felix.framework.Felix.startBundle(Felix.java:1519) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:354) at org.apache.felix.shell.impl.StartCommandImpl.execute( StartCommandImpl.java:82) at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand( Activator.java:265) at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run( Activator.java:167) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.ClassCastException: status.reporter.main.Activator at org.apache.felix.framework.Felix.createBundleActivator(Felix.java :3486) at org.apache.felix.framework.Felix._startBundle(Felix.java:1580) ... 6 more java.lang.ClassCastException: status.reporter.main.Activator ->
This is failing where Felix is trying to cast the created bundle activator instance to BundleActivator, so it seems like some sort of packaging/configuration issue at first glance.
It sounds like your bundle either 1) has its own copy of org.osgi.framework.BundleActivator or 2) it is getting it from some source other than the system bundle.
Normally, org.osgi.framework is only provided by the system bundle. Notice that the debug wiring output above does not include a wire to the system bundle for org.osgi.framework? Make sure your bundle imports it.
Or perhaps you are playing with the boot delegation property? -> richard --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

