Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321182

Summary: MissingObjectException prevents cloning of repository
Product: [Technology] EGit Reporter: Joshua Ross <joshualross>
Component: CoreAssignee: Stefan Lay <stefan.lay>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jens.baumgart, stefan.lay
Version: 0.9.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Joshua Ross CLA 2010-07-28 19:24:32 EDT
I'm trying to clone a repository and I am getting a failure because of a MissingObjectException.  


Message:
-----------------
Cloning Git Repository failed

Exception Stack Trace:
-------------------------
java.lang.reflect.InvocationTargetException
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:129)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:199)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing blob 2c3e27753ac40abd22f17d3f9c678d8fa9c8a16a
at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:96)
at org.eclipse.jgit.lib.ObjectDatabase.open(ObjectDatabase.java:176)
at org.eclipse.jgit.lib.Repository.open(Repository.java:270)
at org.eclipse.jgit.lib.GitIndex.checkoutEntry(GitIndex.java:903)
at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:183)
at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:205)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:142)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:120)
at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:166)
at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:143)
at org.eclipse.egit.core.op.CloneOperation.doCheckout(CloneOperation.java:224)
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:120)
... 2 more
Root exception:
org.eclipse.jgit.errors.MissingObjectException: Missing blob 2c3e27753ac40abd22f17d3f9c678d8fa9c8a16a
at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:96)
at org.eclipse.jgit.lib.ObjectDatabase.open(ObjectDatabase.java:176)
at org.eclipse.jgit.lib.Repository.open(Repository.java:270)
at org.eclipse.jgit.lib.GitIndex.checkoutEntry(GitIndex.java:903)
at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:183)
at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:205)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:142)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:120)
at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:166)
at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:143)
at org.eclipse.egit.core.op.CloneOperation.doCheckout(CloneOperation.java:224)
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:120)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:199)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


Session Data
-------------
eclipse.buildId=I20100608-0911
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.php.product
Command-line arguments:  -data C:\tmp -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.php.product



Ran 'git fsck' on the a repository clone on the same laptop and got the following:

dangling commit 9d548c1d0bb621a59110ab2ccd5b2df3fa907f8a
dangling blob 6c96742eb21b04a571997763193e55cf941fd912
dangling blob 8dfc4c3aa32df52b1f3530272618fa1e54a19ec9
dangling commit 8e2eb54d705aaae996221df5620912d782193b0b
dangling commit 69978ebeb83b12caece5226757f3515de3f31bf7
dangling commit 80b896eb7e99515d38605bd5f2a634fc3a349156
dangling tree a8f6af1199d0ce0d43c42ccb8ff2e92eed95a328
Comment 1 Stefan Lay CLA 2010-09-07 05:26:47 EDT
Does the clone work with native git?

Is the repo public so that we can try to reproduce it?
Comment 2 Joshua Ross CLA 2010-09-07 16:08:10 EDT
sorry, not a public repo.

As a workaround I am using git in cygwin and it is working, so yes, it is working with native git.  It also works on my linux dev machine.
Comment 3 Joshua Ross CLA 2010-09-30 16:24:26 EDT
I keep updating and trying again.  Now the failure is a bit more specific and is citing a missing blob.  Is that an unrecoverable failure?  Seems the command line utils are able to handle it.  Details below:


EGit Version:
0.10.0.201009270918

JGit Version:
0.10.0.201009270915

Problem Occurred
-----------------
'Cloning from ssh://username@my.host.com/path/repos has encountered a problem.
Missing blob 2c3e27753ac40abd22f17d3f9c678d8fa9c8a16a


From the error log
----------------------
Message: 
Missing blob 2c3e27753ac40abd22f17d3f9c678d8fa9c8a16a


Exception Stack Trace:
org.eclipse.jgit.errors.MissingObjectException: Missing blob 2c3e27753ac40abd22f17d3f9c678d8fa9c8a16a
	at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:112)
	at org.eclipse.jgit.lib.ObjectDatabase.open(ObjectDatabase.java:176)
	at org.eclipse.jgit.lib.Repository.open(Repository.java:274)
	at org.eclipse.jgit.lib.GitIndex.checkoutEntry(GitIndex.java:937)
	at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:187)
	at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:205)
	at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:142)
	at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:120)
	at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:166)
	at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:143)
	at org.eclipse.egit.core.op.CloneOperation.doCheckout(CloneOperation.java:231)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:120)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:249)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:242)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:223)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Session Data:
eclipse.buildId=M20100909-0800
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.php.product
Command-line arguments:  -data C:\tmp -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.php.product
Comment 4 Jens Baumgart CLA 2011-06-28 09:49:12 EDT
Can you reproduce the issue with EGit 1.0?
In the meantime the implementation totally changed (GitIndex is no longer used).
Comment 5 Joshua Ross CLA 2011-06-28 15:21:41 EDT
I am no longer getting the error message with 1.0.  It appears to be working although I am having some difficulty figuring out how to create/import a project.