Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Rename error when pull
Rename error when pull [message #1712892] Thu, 29 October 2015 08:43 Go to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

Eclispe Mars update 1
Egit 4.0.3
Windows

We get quite a few rename error (jar-files) when we do pull. This is the scenario:

1) Switch branch
2) Eclispe start to build
3) Pull changes
4) Boom, rename error

ERROR
==========================================
eclipse.buildId=4.5.1.M20150904-0015
java.version=1.8.0_60
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.egit.ui
Error
Thu Oct 29 09:22:42 CET 2015
Exception caught during execution of merge command. java.io.IOException: Could not rename file C:\Users\MAN\Documents\Git\core\java\libsrc\._billiant-dbapi-src.jar1658337769297550996.tmp to C:\Users\MAN\Documents\Git\core\java\libsrc\billiant-dbapi-src.jar

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. java.io.IOException: Could not rename file C:\Users\MAN\Documents\Git\core\java\libsrc\._billiant-dbapi-src.jar1658337769297550996.tmp to C:\Users\MAN\Documents\Git\core\java\libsrc\billiant-dbapi-src.jar
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:415)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:326)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:97)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:128)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:140)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:115)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Could not rename file C:\Users\MAN\Documents\Git\core\java\libsrc\._billiant-dbapi-src.jar1658337769297550996.tmp to C:\Users\MAN\Documents\Git\core\java\libsrc\billiant-dbapi-src.jar
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1188)
at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:450)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:396)
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:288)
... 8 more
==========================================

Since I've seen some bug report for this problem, that is still unsolved, I tried one of the suggestions in one of the bug reports to use file-leak-detector-1.8-jar-with-dependencies.jar (http://mvnrepository.com/artifact/org.kohsuke/file-leak-detector/1.8) to track who is holding a lock to the file that can't be renamed. And I got the following perhaps interesting trace.

#172 C:\Users\MAN\Documents\Git\core\java\lib\billiant-dbapi.jar by thread:Java indexing on Thu Oct 29 09:22:43 CET 2015
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2678)
at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2644)
at org.eclipse.jdt.internal.core.search.matching.JavaSearchNameEnvironment.mapToClassPathLocation(JavaSearchNameEnvironment.java:104)
at org.eclipse.jdt.internal.core.search.matching.JavaSearchNameEnvironment.computeClasspathLocations(JavaSearchNameEnvironment.java:92)
at org.eclipse.jdt.internal.core.search.matching.JavaSearchNameEnvironment.<init>(JavaSearchNameEnvironment.java:51)
at org.eclipse.jdt.internal.core.search.indexing.SourceIndexer.resolveDocument(SourceIndexer.java:159)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.resolveDocument(JavaSearchParticipant.java:102)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexResolvedDocument(IndexManager.java:510)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager$1.execute(IndexManager.java:989)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:405)
at java.lang.Thread.run(Unknown Source)

Now I know its not the same file as in the error trace but both of these files was changed during the branch switch so both would need to be re-indexed.

Can it be so simple that it's a race condition between the jar indexer and jgit?

Are there any way to confirm this (turn of jar-indexer?) Maybe git pull must wait for jar-indexer jobs?

Br,
/Mattias









Re: Rename error when pull [message #1713101 is a reply to message #1712892] Fri, 30 October 2015 23:23 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Can you please report a bug or point me to the existing bug?
Re: Rename error when pull [message #1713150 is a reply to message #1712892] Sun, 01 November 2015 14:06 Go to previous message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi Andrey,

I've added a bugreport for this error:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=481187

Br,

/Mattias
Previous Topic:EGit exceptions and repository state
Next Topic:JGit blame ignore whitespace
Goto Forum:
  


Current Time: Sat Apr 27 00:01:42 GMT 2024

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

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

Back to the top