felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renaud Pelissier <renaud.pelissier.numvis...@gmail.com>
Subject Activator start error, ClassCastException: xxxx cannot be cast to org.osgi.framework.BundleActivator
Date Wed, 13 Jan 2010 17:40:28 GMT
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();
>     }
>
> }
>

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