(solved) Newbie getting bizarre ClassNotFoundException: JSchException [message #778266] |
Thu, 12 January 2012 03:14 |
Alex Dreadd Messages: 8 Registered: January 2012 |
Junior Member |
|
|
I was trying out JGit and set up a very simple program (I am using Eclipse to create the program - but it's a standalone application, so I don't want an eclipse dependency or anything):
public static void main(String[] args) throws Exception
{
File WORKDIR = new File("/home/ismavatar/bot-enigma/git-stable");
String REPO = "htt" + "ps://github.com/enigma-dev/enigma-dev.git"; //split up so the forums don't yell at me for posting links
Git.cloneRepository().setURI(REPO).setDirectory(WORKDIR).call();
}
and made sure JGit was in my build path (which it is, since the Git class is resolving).
Running the program generated the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/jcraft/jsch/JSchException
at org.eclipse.jgit.transport.Transport.<clinit>(Transport.java:111)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:119)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:173)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:119)
at org.ircbot.Tester.main(Tester.java:18)
Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.JSchException
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 5 more
Where Tester.java:18 is the Git.cloneRepository line, of course.
After the call, the directory is created with nothing but a populated .git folder, so it looks like it failed after setting up the meta data.
On second run of the exact same code above, I get the somewhat expected:
org.eclipse.jgit.api.errors.JGitInternalException: Destination path "git-stable" already exists and is not an empty directory
and no ClassLoader error.
Any and all help is greatly appreciated.
[Updated on: Fri, 13 January 2012 19:35] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02580 seconds