Hello,
This is a second post about ClassCastException when running my bundle.
I am running my Bundle and I get a "Activator start error" with a
ClassCastException:
> java.lang.ClassCastException: fr.numvision.kernel.sat.KernelActivator
> cannot be cast to org.osgi.framework.BundleActivator
>
I don't understand this error because
fr.numvision.kernel.sat.KernelActivator IMPLEMENTS
org.osgi.framework.BundleActivator.
Any idea?
Regards,
Renaud
package fr.numvision.kernel.sat;
>
> import org.osgi.framework.BundleActivator;
> import org.osgi.framework.BundleContext;
>
> import fr.numvision.common.NumVisionException;
> import fr.numvision.kernel.IterativeRunner;
> import fr.numvision.kernel.Logger;
> import fr.numvision.kernel.Logger.LoggingLevel;
> import fr.numvision.networkdiscovery.sat.BoxListener;
>
> public class KernelActivator implements BundleActivator{
>
> private Thread boxListenerTread=null;
>
> @Override
> public void start(BundleContext context) throws Exception {
> Logger.createGlobalConsoleLogger();
> Logger.log(this,"Logger was configured properly",
> LoggingLevel.INFO);
>
> System.out.println("STARTING");
> NumVisionException exception=new NumVisionException();
> System.out.println(exception);
>
> Logger.createLogger("kernel",new
> String[]{"fr.numvision.kernel","fr.numvision.networkdiscovery"},ConfigDAO.dirLog);
>
> BoxListener boxListener=new BoxListener();
> IterativeRunner iterativeRunner=new IterativeRunner(boxListener,
> ConfigDAO.getBoxListenerSleepDelay());
> boxListenerTread=new Thread(iterativeRunner);
> boxListenerTread.start();
> }
>
> @Override
> public void stop(BundleContext arg0) throws Exception {
> boxListenerTread.interrupt();
> }
>
> }
>