Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

How to use Thirdparty OSGi bundle in ODL karaf

Hi,

I had created a OSGi bundle without using OpenDayLight framework components, and I am trying to install it in ODL karaf. While installing this bundle I am getting the following error. This I need to do due to some licensing issues.

My question is, Is it possible to run non ODL/MD-SAL OSGi bundles in the ODL Karaf? If it is possible, please suggest me some reference to make this working.

opendaylight-user@root>install -s mvn:starter/producer Bundle IDs: Error executing command: Error installing bundles: Unable to install bundle mvn:starter/producer opendaylight-user@root>log:display 2015-06-16 08:59:59,849 | INFO | Event Dispatcher | SecurityUtils | 117 - org.apache.sshd.core - 0.14.0 | BouncyCastle already registered as a JCE provider 2015-06-16 09:00:00,945 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Starting JMX OSGi agent 2015-06-16 09:00:00,982 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering MBean with ObjectName [osgi.core:service=permissionadmin,version=1.2,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4] for service with service.id [2] 2015-06-16 09:00:00,985 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4] for service with service.id [37] 2015-06-16 09:00:01,011 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@1f4cc34b with name osgi.core:type=serviceState,version=1.7,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4 2015-06-16 09:00:01,013 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@1f4cc34b with name osgi.core:type=packageState,version=1.5,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4 2015-06-16 09:00:01,013 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering org.osgi.jmx.service.permissionadmin.PermissionAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@1f4cc34b with name osgi.core:service=permissionadmin,version=1.2,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4 2015-06-16 09:00:01,013 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@1f4cc34b with name osgi.compendium:service=cm,version=1.3,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4 2015-06-16 09:00:01,013 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@1f4cc34b with name osgi.core:type=framework,version=1.7,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4 2015-06-16 09:00:01,014 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@1f4cc34b with name osgi.core:type=wiringState,version=1.1,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4 2015-06-16 09:00:01,014 | INFO | Event Dispatcher | core | 250 - org.apache.aries.jmx.core - 1.1.2 | Registering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@1f4cc34b with name osgi.core:type=bundleState,version=1.7,framework=org.eclipse.osgi,uuid=90f14ff2-d713-0015-117e-e44d216989d4 2015-06-16 09:00:11,842 | ERROR | l for user karaf | ShellUtil | 25 - org.apache.karaf.shell.console - 3.0.3 | Exception caught while executing command org.apache.karaf.shell.console.MultiException: Error installing bundles: Unable to install bundle mvn:starter/producer at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:92) at org.apache.karaf.bundle.command.Install.doExecute(Install.java:69) at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3] at Proxyb24fdcb5291a400d822c2dfd36daf4cb.execute(Unknown Source)[:] at Proxyb24fdcb5291a400d822c2dfd36daf4cb.execute(Unknown Source)[:] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:3.0.3] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92) at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208) at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109) at java.security.AccessController.doPrivileged(Native Method)[:1.7.075] at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[26:org.apache.karaf.jaas.modules:3.0.3] at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)[25:org.apache.karaf.shell.console:3.0.3] Caused by: java.lang.Exception: Unable to install bundle mvn:starter/producer at org.apache.karaf.bundle.command.Install.doExecute(Install.java:45) ... 17 more Caused by: org.osgi.framework.BundleException: An error occurred trying to read the bundle at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:94) at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:941) at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:845) at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:1) at java.security.AccessController.doPrivileged(Native Method)[:1.7.075] at org.eclipse.osgi.framework.internal.core.Framework.installWorker(Framework.java:904) at org.eclipse.osgi.framework.internal.core.Framework.installBundle(Framework.java:840) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:137) at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43) ... 17 more Caused by: java.io.IOException: Error resolving artifact starter:producer:jar:LATEST at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:491) at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433) at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411) at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386) at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124) at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:56) ... 25 more Caused by: shaded.org.eclipse.aether.resolution.VersionRangeResolutionException: No highest version found for starter:producer:jar:(0.0,] at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveLatestVersionRange(AetherBasedResolver.java:666) at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:475) ... 30 more