Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » unable to push sources to JGit in Gerrit( Invalid tree a33cf05e7a: duplicate entry names)
unable to push sources to JGit in Gerrit [message #1516007] Thu, 18 December 2014 15:35 Go to next message
Roman Shiryaev is currently offline Roman ShiryaevFriend
Messages: 2
Registered: December 2014
Junior Member
Hello,

we got stuck with the following exception when trying to push sources from an old git repo (hosted not in Gerrit) to a new one in Gerrit (ver. 2.9.3)

Could you suggest any idea for solving the issue? How to eliminate the duplicates properly?

Thanks in advance.

[2014-12-18 13:04:49,814] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user XXX account 1000017) during git-receive-pack '/projectname1/module1'
com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check server log
        at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:176)
        at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:101)
        at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:32)
        at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:70)
        at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:442)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:364)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Unpack error on project "projectname1/module1":
  AdvertiseRefsHook: org.eclipse.jgit.transport.AdvertiseRefsHookChain@2453e48cclass org.eclipse.jgit.transport.AdvertiseRefsHookChain

        at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:175)
        ... 12 more
Caused by: org.eclipse.jgit.errors.UnpackException: Exception while parsing pack stream
        at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:239)
        at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:160)
        at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:115)
        ... 12 more
Caused by: org.eclipse.jgit.errors.CorruptObjectException: Invalid tree a33cf05e7a: duplicate entry names
        at org.eclipse.jgit.transport.PackParser.verifySafeObject(PackParser.java:1017)
        at org.eclipse.jgit.transport.PackParser.whole(PackParser.java:998)
        at org.eclipse.jgit.transport.PackParser.indexOneObject(PackParser.java:916)
        at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:487)
        at org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:194)
        at org.eclipse.jgit.transport.BaseReceivePack.receivePack(BaseReceivePack.java:1020)
        at org.eclipse.jgit.transport.BaseReceivePack.receivePackAndCheckConnectivity(BaseReceivePack.java:848)
        at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:191)
        ... 14 more
Caused by: org.eclipse.jgit.errors.CorruptObjectException: duplicate entry names
        at org.eclipse.jgit.lib.ObjectChecker.checkTree(ObjectChecker.java:388)
        at org.eclipse.jgit.lib.ObjectChecker.check(ObjectChecker.java:179)
        at org.eclipse.jgit.transport.PackParser.verifySafeObject(PackParser.java:1015)
        ... 21 more

Re: unable to push sources to JGit in Gerrit [message #1528775 is a reply to message #1516007] Thu, 25 December 2014 23:46 Go to previous message
Roman Shiryaev is currently offline Roman ShiryaevFriend
Messages: 2
Registered: December 2014
Junior Member
Posting here the solution given to me by Roberto Tyley in jgit-dev maillist.

Quote:
You can clean your Git history of duplicate entries with the BFG:

https:// github.com/rtyley/bfg-repo-cleaner/releases/tag/v1.11.1

$ bfg --fix-filename-duplicates-preferring tree

Seasons greetings,
Roberto


Thus, use Roberto's super useful BFG tool to fix all errors that you see in `git fsck`

https:// rtyley.github.io/bfg-repo-cleaner/
Previous Topic:TeamProjectSet repository-folder
Next Topic:Setting up classpath for source control
Goto Forum:
  


Current Time: Thu Dec 12 23:31:44 GMT 2019

Powered by FUDForum. Page generated in 0.02564 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top