eclipse啟動報錯:An error has occurred.See the log file D:\eclipse\configuration\1552616709202.log


  如題,Eclipse崩了,只能按它留下的線索去看了1552616709202.log:

!SESSION 2019-03-15 10:25:08.739 -----------------------------------------------
eclipse.buildId=4.6.2.M20161124-1400
java.version=1.8.0_181
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
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

!ENTRY org.eclipse.equinox.ds 2 0 2019-03-15 10:25:40.333
!MESSAGE [SCR - WorkThread] Timeout occurred! Thread was blocked on processing [QueuedJob] WorkPerformer: org.eclipse.equinox.internal.ds.SCRManager@701a36b3; actionType 1

!ENTRY org.eclipse.equinox.ds 2 0 2019-03-15 10:25:40.340
!MESSAGE [SCR] Enabling components of bundle org.eclipse.ui.trace did not complete in 30000 ms 

!ENTRY org.eclipse.core.runtime 4 0 2019-03-15 10:25:45.367
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="3.12.0.v20160606-1342"; osgi.identity="org.eclipse.core.runtime"; singleton:="true" [id=112] 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.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
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)
    ... 8 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.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

  從日志看是拿鎖超時了,關鍵是鎖在哪?鎖在工作空間的.metadata目錄里:

  把這個日志(eclipse\configuration\1552616709202.log)和鎖(workspace\.metadata\.lock)刪了再試試就ok了,Eclipse正常啟動。

  碰到這種啟動失敗的場景,基本就是清理這兩個目錄(configuration和.metadata)這條路子。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM