1

安装 Team Explorer Everywhere 插件后,Eclipse 氧气在加载后立即关闭。我安装了 JRE 版本 1.8.0_131。Windows 7 64 操作系统,2 GB 内存。在此之前我已经安装了 GIT 并附加到系统变量 C:\Program Files\Git\cmd 的路径中。我还使用变量值 C:\Program Files\Java\jre1.8.0_131 设置了 HOME 环境变量。一旦 Eclipse 在 .log 中写入以下文本:

!ENTRY org.eclipse.osgi 2 0 2017-07-14 10:14:17.583
!MESSAGE While loading class "com.microsoft.tfs.client.eclipse.util.TeamUtils", thread "Thread[Worker-5,5,main]" timed out waiting (5248ms) for thread "Thread[Worker-3,5,main]" to finish starting bundle "com.microsoft.tfs.client.eclipse_14.119.2.201706191916 [552]". To avoid deadlock, thread "Thread[Worker-5,5,main]" is proceeding but "com.microsoft.tfs.client.eclipse.util.TeamUtils" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="14.119.2.201706191916"; osgi.identity="com.microsoft.tfs.client.eclipse"; singleton:="true" [id=552] STARTED [STARTED]
    at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337)
    at org.eclipse.osgi.container.Module.start(Module.java:401)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
    at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:368)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:446)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.microsoft.tfs.client.eclipse.project.ProjectRepositoryManager.shouldConnect(ProjectRepositoryManager.java:529)
    at com.microsoft.tfs.client.eclipse.project.ProjectRepositoryManager.start(ProjectRepositoryManager.java:179)
    at com.microsoft.tfs.client.eclipse.TFSEclipseClientPlugin$1.run(TFSEclipseClientPlugin.java:106)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
    at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
    ... 15 more
Root exception:
java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
    at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
    at org.eclipse.osgi.container.Module.start(Module.java:401)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
    at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:368)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:446)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.microsoft.tfs.client.eclipse.project.ProjectRepositoryManager.shouldConnect(ProjectRepositoryManager.java:529)
    at com.microsoft.tfs.client.eclipse.project.ProjectRepositoryManager.start(ProjectRepositoryManager.java:179)
    at com.microsoft.tfs.client.eclipse.TFSEclipseClientPlugin$1.run(TFSEclipseClientPlugin.java:106)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
4

1 回答 1

0

请尝试以下方法来解决此问题:

  • 从您的工作区.metadata文件夹中删除.Lock文件。
  • 删除下的.fileTableLock文件

    C:\Users{您的帐户}\eclipse\java-neon\eclipse\configuration\org.eclipse.osgi.manager

  • 在你的eclipse.ini (通常应该在 C:\Users{your account}\eclipse\java-neon\eclipse)文件中设置以下标志,以将 osgi 超时值从 5 秒增加到 2 分钟,以防止 osgi 超时出得太快了。

    -Dequinox.statechange.timeout=120000

  • 在eclipse.ini文件中设置以下平面以忽略检查配置。

    -Dosgi.checkConfiguration=false

  • 转到您的工作区目录并执行以下步骤:

    1. 导航到.metadata/.plugins

    2. 将org.eclipse.core.resources重命名为org.eclipse.core.resources.bak。(备份它)

    3. 开始日食。(它应该显示一条错误消息或一个空的工作区,因为没有找到项目。)

    4. 关闭所有打开的编辑器选项卡。

    5. 退出日食。
    6. 删除org.eclipse.core.resources(删除新创建的目录。)
    7. 将org.eclipse.core.resources.bak重命名回org.eclipse.core.resources(恢复原目录。)
    8. 启动eclipse并开始工作。
于 2017-07-17T03:25:49.290 回答