I am trying to develop an Eclipse plugin. This plugin uses jgit to accecc git repositories over ssh with ubuntu username and password. (Clone git repository over ssh with username and password by Java) Using jgit in this with NetbBeans works just fine. Without a problem it can clone, commit and push projects. However when I move the same code fragment into Eclipse jsch of jgit plugin and the jsch I've added to the project conflicts. If I remove the one I've I added then I cannot compile the code (I need to import com.jcraft.jsch.Session in a class). On the other hand, if it is added I've got the following error
java.lang.LinkageError:
loader constraint violation: loader
(instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
previously initiated loading for a different type with name
"com/jcraft/jsch/Session"
Is there a way out of this mess?
I am using jgit-3.2.0 and jsch-0.1.5.0 Eclipse version is Kepler.
My plugin manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ****
Bundle-SymbolicName: ****;singleton:=true
Bundle-Version: 1.1.0513
Bundle-Activator: ****.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.browser;bundle-version="3.4.100",
org.eclipse.core.resources;bundle-version="3.8.100",
org.eclipse.ui.ide;bundle-version="3.9.0",
org.eclipse.jdt.core;bundle-version="3.9.0",
org.eclipse.core.filesystem;bundle-version="1.4.0",
org.eclipse.team.core;bundle-version="3.7.0",
org.eclipse.jgit;bundle-version="3.2.0",
org.eclipse.jdt.launching;bundle-version="3.7.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/commons-io-2.4.jar,
lib/zip4j_1.3.2.jar,
lib/jsch-0.1.50.jar