1 Reply Latest reply on Aug 29, 2011 9:41 PM by Freeman(Yue) Fang

    Starting org.eclipse.osgi bundle

    Barry Hathaway Newbie

      My service bundle requires a number of eclipse bundles so I'm attempting to install:

       

          install -s mvn:org.eclipse.equinox/org.eclipse.equinox.common/3.5.0.v20090520-1800

          install -s mvn:org.eclipse.core/org.eclipse.core.jobs/3.4.100.v20090429-1800

          install -s mvn:org.eclipse.equinox/org.eclipse.equinox.preferences/3.3.0.v20100503

          install -s mvn:org.eclipse.equinox/org.eclipse.equinox.registry/3.4.100.v20090520-1800

          install -s mvn:org.eclipse.equinox/org.eclipse.equinox.app/1.3.0.v20100512

          install -s mvn:org.eclipse.core/org.eclipse.core.contenttype/3.4.100.v20100505-1235

          install -s mvn:org.eclipse.core/org.eclipse.core.runtime/3.6.0.v20100505

          install -s mvn:org.eclipse.core/org.eclipse.core.expressions/3.4.200.v20100505

          install -s mvn:org.eclipse.core/org.eclipse.core.filesystem/1.3.0.v20100526-0737

          install -s mvn:org.eclipse.core/org.eclipse.core.resources/3.6.0.v20100526-0737

          install -s mvn:org.eclipse.emf/common/2.4.0

          install -s mvn:org.eclipse.emf/ecore/2.3.0-v200706262000

       

      The first one seems to want org.eclipse.osgi.framework.log so I tried installing it from

      the fuse 4.4 distribution:

       

      install file:D:
      apache-servicemix-4.4.0-fuse-00-43
      system
      org
      eclipse
      osgi
      3.6.0.v20100517
      osgi-3.6.0.v20100517.jar

       

      It installed OK; however when starting it I received:

       

      18:55:58,580 | INFO  | l Console Thread | Console                          | 38 - org.apache.karaf.shell.console - 2.2.0.fuse-00-43 | Exception caught while executing command

      org.osgi.framework.BundleException: Activator start error in bundle org.eclipse.osgi .

           at org.apache.felix.framework.Felix.activateBundle(Felix.java:1883)[org.apache.felix.framework-3.0.9-fuse-00-43.jar:]

           at org.apache.felix.framework.Felix.startBundle(Felix.java:1753)[org.apache.felix.framework-3.0.9-fuse-00-43.jar:]

           at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)[org.apache.felix.framework-3.0.9-fuse-00-43.jar:]

           at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914)[org.apache.felix.framework-3.0.9-fuse-00-43.jar:]

           at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:29)[21:org.apache.karaf.shell.osgi:2.2.0.fuse-00-43]

           at org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:37)[21:org.apache.karaf.shell.osgi:2.2.0.fuse-00-43]

           at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:79)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at org.apache.karaf.shell.console.jline.Console.run(Console.java:240)[38:org.apache.karaf.shell.console:2.2.0.fuse-00-43]

           at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]

      Caused by: java.lang.ClassCastException: org.eclipse.osgi.framework.internal.core.SystemBundleActivator cannot be cast to org.osgi.framework.BundleActivator

           at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3686)[org.apache.felix.framework-3.0.9-fuse-00-43.jar:]

           at org.apache.felix.framework.Felix.activateBundle(Felix.java:1831)[org.apache.felix.framework-3.0.9-fuse-00-43.jar:]

           ... 16 more

       

      Any ideas?

      Thanks

       

      Barry Hathaway

        • 1. Re: Starting org.eclipse.osgi bundle
          Freeman(Yue) Fang Master

          Hi,

           

          The felix and equinox are different OSGi implementations, you can't install two framework bundle together, so you can't install org/eclipse/osgi/3.6.0.v20100517/osgi-3.6.0.v20100517.jar(this is the framework bundle for equinox implementation) in felix implementation.

           

          However, you can edit $FUSE_ESB/etc/config.properties, change

          karaf.framework=felix

          to

          karaf.framework=equinox

          if you want to use classes from equinox framework bundle.

           

          Freeman