I am new to maven.
I am trying to import a jar dependency (com.jcraft.jsch
) in my opendaylight controller project. The code compiles successfully. But when the controller is run, it throws the following errors.
!ENTRY org.opendaylight.controller.samples.ssr 4 0 2013-10-11 10:25:14.624 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: The bundle "org.opendaylight.controller.samples.ssr_0.4.0.SNAPSHOT [36]" could not be resolved. Reason: Missing Constraint: Import-Package: com.jcraft.jsch; version="0.0.0" at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332) at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) 2013-10-11 10:25:14.627 IST [org.opendaylight.controller.logging.bridge.internal.LogListenerImpl@190c63b2] ERROR o.o.c.logging.bridge.OSGI2SLF4J - Bundle:org.opendaylight.controller.samples.ssr Message:FrameworkEvent ERROR Exception:org.osgi.framework.BundleException: The bundle "org.opendaylight.controller.samples.ssr_0.4.0.SNAPSHOT [36]" could not be resolved. Reason: Missing Constraint: Import-Package: com.jcraft.jsch; version="0.0.0"
I have imported that package. The package org.opendaylight.controller.samples.ssr is added by me in it. Basically, I have modified one of the packages in samples. The problem is I am trying to import one jar dependency com.jcraft.jsch in one of the classes in this package. But there is a problem with importing this jar.
I have been slogging after this issue for last couple of weeks. Any suggestions or solutions please. Thanks in advance.