欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

eclipse 抛 error: could not create the java virtual machine.Error: A fatal exception has occurred解决方法

程序员文章站 2022-04-28 16:38:46
...

如下,配置过 eclipse 后,再次打开,抛如下

eclipse 抛 error: could not create the java virtual machine.Error: A fatal exception has occurred解决方法

org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.core.runtime"; type="osgi.bundle"; version:Version="3.10.0.v20140318-2214"; singleton:="true" [id=86] STARTED [STARTED]
    at org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)
    at org.eclipse.osgi.container.Module.start(Module.java:389)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
    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)

!ENTRY org.eclipse.osgi 2 0 2019-05-26 14:10:00.538
!MESSAGE While loading class "org.eclipse.core.runtime.Plugin", thread "Thread[Start Level: Equinox Container: e00750cc-7c7f-0019-10e2-e33a4f7228ff,5,main]" timed out waiting (5001ms) for thread "Thread[Component Resolve Thread,5,main]" to finish starting bundle "org.eclipse.core.runtime_3.10.0.v20140318-2214 [86]". To avoid deadlock, thread "Thread[Start Level: Equinox Container: e00750cc-7c7f-0019-10e2-e33a4f7228ff,5,main]" is proceeding but "org.eclipse.core.runtime.Plugin" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.core.runtime"; type="osgi.bundle"; version:Version="3.10.0.v20140318-2214"; singleton:="true" [id=86] STARTED [STARTED]


 解决方法:

我的问题是由于 lombok.jar 引起的。
我先手动在D:\eclipse-2015\eclipse.ini加了 lombok.jar,  然后又使用了  java -jar D:/eclipse-2015/lombok.jar 来注册导致。
删除
 -Xboot classpath/a:lombok.jar
-javaagent:D:/eclipse-2015/lombok.jar
后解决问题.

...
-Xms128m
-Xmx768m
-javaagent:lombok.jar
//删除以下两行解决问题
-Xboot classpath/a:lombok.jar
-javaagent:D:/eclipse-2015/lombok.jar

 



以下方法供参考

Is there a way to fix it? And if not, is there a way to just hide that stupid exception (disable logging for a moment, clearing the log, whatever, I'm not picky)?

回答1:

This looks like the framework start up starts simpleconfigurator which tries to start the framework again. The framework detects this recursion and throws an exception to escape it. The problem appears to be in simpleconfigurator attempting the start the framework which is starting it.


回答2:

I solved problem by following these simple steps,

  1. Go to your eclipse directory and open configuration directory.
  2. open org.eclipse.osgi directory.
  3. open .manager folder.
  4. Delete .fileTableLock file.
  5. Restart your eclipse.

eclipse 抛 error: could not create the java virtual machine.Error: A fatal exception has occurred解决方法


回答3:

I faced same issue.Deleting the given .log file from configuration folder and restarting eclipse should resolve your problem.


回答4:

I use Red Hat Developer Studio 10.4 (Eclipse 4.6) and i tried use Eclipse Checkstyle plugin.

After install i restarted my IDE and received the crash notification.

I tried all suggestions but only when i delete a file called framework.info.34 my problem was solved.

This file is in %eclipse_home%/configuration/org.eclipse.osgi folder.

回答5:

Issue pop-up after upgrading eclipse neon through update-site along with installation of some new plugins.

Step 01: I removed .fileTable.* lock files from ${eclipse_home}/configuration/org.eclipse.osgi/.manager directory.

Step 02: Removed osgi cache and other plugins cache by starting in eclipse clean mode

eclipse -clean


回答6:

i have the same issue,

i removed the files from respective places 1) "eclipse\configuration\org.eclipse.osgi.manager" .fileTableLock .fileTable3 .fileTable4

2) eclipse\configuration *.log

after that i opened the eclipse, it worked with out any restart of PC.


回答7:

for people that have this problem until runing eclipse in runtime from eclipse : clean folder : [yourEclipseSourceWorkspace]/.metadata/.plugins/org.eclipse.pde.core/[yourRunConfiguration]/org.eclipse.osgi/.manager [yourEclipseSourceWorkspace]/.metadata/.plugins/org.eclipse.pde.core/[yourRunConfiguration]/org.eclipse.osgi remove all files (not folder) then add to your configuration -clean as programm arg