Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2240

Incompatible Equinox version

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0.RC1
    • 3.0.0
    • None
    • None

    Description

      Karaf 3.0.0.RC1 comes with Equinox 3.8.0 which provides org.osgi.framework 1.7.

      This does not match the OSGi system packages declared in etc/config.properties, including org.osgi.framework 1.6.

      At runtime, I'm getting strange stacktraces like the following which I suspect to be due to this conflict:

      java.lang.NoSuchMethodError: org.osgi.framework.Version.toString0()Ljava/lang/String;
      at org.osgi.framework.VersionRange.toString(VersionRange.java:393)[osgi-3.8.0.v20120529-1548.jar:]
      at java.lang.String.valueOf(String.java:2854)[:1.7.0_17]
      at java.lang.StringBuffer.append(StringBuffer.java:232)[:1.7.0_17]
      at org.eclipse.osgi.internal.resolver.ImportPackageSpecificationImpl.toString(ImportPackageSpecificationImpl.java:212)
      at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundle(ResolverImpl.java:1373)
      at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles0(ResolverImpl.java:783)
      at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles(ResolverImpl.java:653)
      at org.eclipse.osgi.internal.module.ResolverImpl.resolve(ResolverImpl.java:487)
      at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:481)
      at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:557)
      at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:249)
      at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:192)
      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:322)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:292)
      at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:27)
      at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:53)
      at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:50)
      at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:41)
      at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
      at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
      at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_17]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_17]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_17]
      at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_17]
      at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
      at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
      at org.apache.karaf.shell.console.commands.$BlueprintCommand1800385139.execute(Unknown Source)
      at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
      at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:182)
      at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]
      at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:102)[48:org.apache.karaf.shell.console:3.0.0.RC1]
      at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:93)
      at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_17]
      at javax.security.auth.Subject.doAs(Subject.java:356)[:1.7.0_17]
      at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:91)[48:org.apache.karaf.shell.console:3.0.0.RC1]

      To reproduce:

      • Unpack a Karaf distro.
      • Set karaf.framework=equinox in etc/config.properties
      • Start Karaf.
      • Install a bundle with unsatisfied imports, e.g. install mvn:org.ops4j.pax.exam/pax-exam/3.0.1
      • Start the bundle.

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              hwellmann Harald Wellmann
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: