1 Reply Latest reply on Apr 30, 2009 11:33 AM by Hadrian Zbarcea

    ERROR BundleException: Activator start error.

    chaitanya m Newbie

      Hi,

      When i start the bundle it is giving the following error.

       

      ERROR BundleException: Activator start error.

       

      Bundle structure:

       

      $ jar tvf tutorialbundle.jar

           0 Thu Apr 17 11:57:14 EDT 2008 META-INF/

         391 Thu Apr 17 11:57:12 EDT 2008 META-INF/MANIFEST.MF

           0 Thu Apr 17 11:29:56 EDT 2008 tutorial/

         714 Thu Apr 17 11:51:02 EDT 2008 tutorial/TutorialActivator.class

         902 Thu Apr 17 11:15:28 EDT 2008 baselib.jar

       

      TutorialActivator class

       

      package tutorial;

       

      import org.osgi.framework.BundleActivator;

      import org.osgi.framework.BundleContext;

       

      import java.util.logging.Logger;

       

      public class TutorialActivator implements BundleActivator {

        Logger log=Logger.getLogger(this.getClass().getName());

        public void start(BundleContext bc) {

          log.info("started");

          int test = new Test().add(19,29);

          log.info("Test  = " + test);

          baselib.BaseService lib = new baselib.BaseService();

          log.info("New Object created");

          lib.sayHello();

        }

       

        public void stop(BundleContext bc) {

          log.info("stopped.");

        }

      }

       

      BaseService class:

       

      package baselib;

       

      import java.util.logging.Logger;

       

      public class BaseService {

        Logger log=Logger.getLogger(this.getClass().getName());

        public void sayHello() {

          log.info("Hello, world!");

        }

      }

       

      MANIFEST.MF File:

      Manifest-Version: 1.0

      Bundle-ManifestVersion: 2

      Bundle-SymbolicName: com.theserverside.tutorial.osgi.TutorialBundle

      Bundle-Version: 1

      Bundle-Activator: tutorial.TutorialActivator

      Import-Package: org.osgi.framework;version="1.3.0"

      Bundle-ClassPath: .,baselib.jar

       

       

      i followed the steps given in the following site for creating a bundle.

      http://www.theserverside.com/tt/articles/article.tss?l=OSGiforBeginners