git-tf checkin线程中的异常“main” java.lang.StackOverflowError的 [英] git-tf checkin Exception in thread "main" java.lang.StackOverflowError

查看:128
本文介绍了git-tf checkin线程中的异常“main” java.lang.StackOverflowError的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用git-tf检查现有的git存储库并将其检入到TFS预览中,并且在尝试执行检入时出现错误。以下是我迄今为止所做的工作。


  1. git clone -b https:/ /github.com/ .git克隆我想检入的分支。我想检入一个没有命名为master的分支到TFS中。


  2. git tf来配置TFS连接。

  3. git tf checkin
    然后,我得到以下错误:


检入到$ /:0%
git-tf:no HEAD ref



<然后我创建了一个主分支,因为我没有做以下操作:git branch -b master
  • >

    切换回分支我检出:git checkout。


  • 再次尝试检查:git tf checkin。


  • 这让我越过了第一个错误。但是,我得到了以下错误,我不知道该怎么做。

  • 有没有人有任何想法如何通过运行git tf checkin来通过下面的错误?


    $ b $ p

    谢谢!

     连接到TFS ... 
    检入$ / Sandbox / HammerheadGitTest / sCRM:
    线程main中的异常java.lang.StackOverflowError $ b $在java.io.RandomAccessFile.seek(Native方法)
    在org.eclipse.jgit。在org.eclipse.jgit.storage.file.WindowCache.load(WindowCache.java:314)
    处使用storage.file.PackFile.read(PackFile.java:614)
    。 storage.file.WindowCache.getOrLoad(WindowCache.java:393)在org.eclipse.jgit.storage.file.WindowCache.get(WindowCache.java:204)上
    在org.eclipse.jgit处
    。 storage.file.WindowCursor.pin(WindowCursor.java:334)在org.eclipse.jgit.storage.file.WindowCursor.copy(WindowCursor.java:203)上
    在org.eclipse.jgit上
    。 storage.file.PackFile.readFully(PackFile.java:526)
    at org.eclipse.jgit.storage.file.PackFile.load(Pack File.java:684)
    at org.eclipse.jgit.storage.file.PackFile.get(PackFile.java:227)
    at org.eclipse.jgit.storage.file.ObjectDirectory.openObject1( ObjectDirectory.java:439)
    在org.eclipse.jgit.storage.file.FileObjectDatabase.openObjectImpl1(FileObjectDatabase.java:172)
    在org.eclipse.jgit.storage.file.FileObjectDatabase.openObject( FileObjectDatabase.java:157)
    在org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:122)
    在org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk。 Java的:856)
    在org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:136)
    在org.eclipse.jgit.revwalk.RevWalk.parseHeaders(RevWalk.java:965)
    at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:814)
    at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:725)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:260)
    at com.microsoft.gittf.core.util.C ommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util。 CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util。 CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util。 CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util。 CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    。在com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)

    最后两行在很长一段时间里一遍又一遍地继续。 我在 codeplex.com 与解决此问题的工作。这是我得到的答案:

    你好,



    你看到这个问题是因为你试图检查在一个巨大的提交树中,可能超过2000 - 3000个提交。我们的代码有一些递归逻辑来标识要提交的提交。这个逻辑因为它本质上是递归的,所以它将JVM调用堆栈大小推到1800标记之上,这大约是JVM使用的默认限制,高于那个JVM会抛出一个你看到的StackOverFlowException。这是一个JVM限制,幸运的是,有一种解决方法可以使用参数来扩展堆栈大小以避免出现此错误。



    您需要更新git-tf。 cmd(git-tf,如果不在windows中运行),并将-Xss3m附加到对java.exe的调用中。

    我们有一个用户故事将使这种情况在未来更好。



    谢谢,
    Youhana



    这里是链接到答案: http://gittf.codeplex.com/workitem/43 p>

    I am trying to take an existing git repository and check it in to TFS Preview using git-tf, and I am getting an error when I try to do the check in. Here is what I have done so far.

    1. git clone -b https://github.com/.git to clone the branch that I want to check in. I want to check in a branch that isn't named master into TFS.

    2. cd into local path of code.

    3. git tf configure https://.tfspreview.com/DefaultCollection $/ Then, I configured git tf to configure the TFS connection.

    4. git tf checkin Then, I got the following error:

    Checking in to $/: 0% git-tf: no HEAD ref

    1. So I then created a master branch since I didn't have one by doing the following: git branch -b master

    2. Switched back to the branch I checked out: git checkout .

    3. Tried the check in again: git tf checkin.

    4. That got me past the first error. However, I got the following error, and I am not sure what to do about this.

    Does anyone have any ideas on how to get past the error below from running git tf checkin?

    Thanks!

    Connecting to TFS...
    Checking in to $/Sandbox/HammerheadGitTest/sCRM: 
    Exception in thread "main" java.lang.StackOverflowError
        at java.io.RandomAccessFile.seek(Native Method)
        at org.eclipse.jgit.storage.file.PackFile.read(PackFile.java:614)
        at org.eclipse.jgit.storage.file.WindowCache.load(WindowCache.java:314)
        at org.eclipse.jgit.storage.file.WindowCache.getOrLoad(WindowCache.java:393)
        at org.eclipse.jgit.storage.file.WindowCache.get(WindowCache.java:204)
        at org.eclipse.jgit.storage.file.WindowCursor.pin(WindowCursor.java:334)
        at org.eclipse.jgit.storage.file.WindowCursor.copy(WindowCursor.java:203)
        at org.eclipse.jgit.storage.file.PackFile.readFully(PackFile.java:526)
        at org.eclipse.jgit.storage.file.PackFile.load(PackFile.java:684)
        at org.eclipse.jgit.storage.file.PackFile.get(PackFile.java:227)
        at org.eclipse.jgit.storage.file.ObjectDirectory.openObject1(ObjectDirectory.java:439)
        at org.eclipse.jgit.storage.file.FileObjectDatabase.openObjectImpl1(FileObjectDatabase.java:172)
        at org.eclipse.jgit.storage.file.FileObjectDatabase.openObject(FileObjectDatabase.java:157)
        at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:122)
        at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:856)
        at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:136)
        at org.eclipse.jgit.revwalk.RevWalk.parseHeaders(RevWalk.java:965)
        at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:814)
        at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:725)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:260)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
        at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    

    The last two lines continues over and over again for a long time.

    解决方案

    I got a response on codeplex.com with the work around to this issue. Here is the answer I got:

    Hello,

    You are seeing this problem because you are trying to check in a huge commit tree with probably more than 2000 - 3000 commits deep. Our code has some recursive logic to identify the commits to be checked in. This logic because it is recursive in nature pushes the JVM call stack size to above the 1800 mark which is around the default limit that the JVM works with, above that there the JVM will throw a StackOverFlowException which you are seeing. This is a JVM limitation, fortunately there is a workaround to extend the stack size using a parameter to get past this error.

    You will need to update the git-tf.cmd (git-tf if not running in windows) in your git-tf deployment directory and append –Xss3m to the call to "java.exe".

    We have a user story to make this scenario better in the future.

    Thanks, Youhana

    Here is a link to the answer: http://gittf.codeplex.com/workitem/43

    这篇关于git-tf checkin线程中的异常“main” java.lang.StackOverflowError的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆