Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError while Migrating existing repository data to LFS [Using git-lfs-migrate] #28

Open
samsonpaul87 opened this issue Jan 31, 2017 · 4 comments

Comments

@samsonpaul87
Copy link

Hi,
I have completed following steps (https://github.com/git-lfs/git-lfs/wiki/Tutorial#migrating-existing-repository-data-to-lfs) to migrate existing repository data to LFS, mentioned here.

  • Install Java 1.8 or later
  • Download the latest binaries from here
  • Do a mirror clone of the repository to rewrite: git clone --mirror git@github.com:bozaro/git-lfs-migrate.git

I ended up with NoClassDefFoundError while trying to run the following step

  • Rewrite e.g. all *.mp4 video files in the repository:

Following is my full stack. Please note that, I have changed the .git file name and project name, due to security issues.

admin@admin-ThinkPad:~/MyProjects/MiProject_Repo_Mirror$ java -jar git-lfs-migrate.jar      -s miproject_android_studio.git      -d miproject_android_studio_lfs-migrate-converted.git      -g https://myrepository@bitbucket.org/miproject/miproject_android_studio_lfs-migrate-converted.git      "*.sqlite"      "*.sqlite.zip"
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.HttpClient
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more
admin@admin-ThinkPad:~/MyProjects/MiProject_Repo_Mirror$ 


@samsonpaul87
Copy link
Author

samsonpaul87 commented Feb 1, 2017

@bozaro , @robinst , @leth , @brad . Could someone look into this issue and help me resolve it. Thanks.

@bozaro
Copy link
Owner

bozaro commented Feb 1, 2017

Looks like you lost vendors directory from git-lfs-migrate.zip archive...

@samsonpaul87
Copy link
Author

@bozaro . Looks like vendors directory is inside git-lfs-migrate.zip file. I am not at all referring the zip file archive in the command. What should be the command to execute?
Currently, I am executing the following command. Please go through it and let me know, the proper command to get it work.
java -jar git-lfs-migrate.jar -s miproject_android_studio.git -d miproject_android_studio_lfs-migrate-converted.git -g https://myrepository@bitbucket.org/miproject/miproject_android_studio_lfs-migrate-converted.git "*.sqlite" "*.sqlite.zip"

@bozaro
Copy link
Owner

bozaro commented Feb 16, 2017

Command is correct, but vendors directory should presend near git-lfs-migrate.jar.
So, you simply need unpack whole .zip-archive and run command without moving/deleting files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants