简体   繁体   English

Eclipse启动错误java.lang.ClassNotFoundException

[英]Eclipse startup error java.lang.ClassNotFoundException

My Eclipse encountered this error on startup after installing Jaspersoft plugin: 我的Eclipse在安装Jaspersoft插件后在启动时遇到此错误:

!ENTRY org.eclipse.osgi 4 0 2016-07-19 14:05:02.890
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/w3c/dom/Node
    at org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl.createXMLLoad(XMIResourceImpl.java:55)
    at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.createXMLLoad(XMLResourceImpl.java:166)
    ...
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node cannot be found by org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:455)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 31 more

I also got same problem, after install Jaspersoft Studio as plugin in Eclipse 4.2.2, using Jaspersoft Studio Update Site - http://jasperstudio.sourceforge.net/updates/ 使用Jaspersoft Studio更新站点-在Eclipse 4.2.2中将Jaspersoft Studio作为插件安装后,我也遇到了同样的问题-http: //jasperstudio.sourceforge.net/updates/

I don't know why/how but it work on me, following steps: 我不知道为什么/如何运行,但是可以按照以下步骤对我起作用:
- I check for file ' org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348 ' (@alok-ray), it does exist but eclipse still error when run. -我检查文件' org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348 '(@ alok-ray),它确实存在,但是运行时eclipse仍然错误。
- I delete it or move it to different location, then run eclipse (it will show another error and close) -我将其删除或将其移动到其他位置,然后运行eclipse(它将显示另一个错误并关闭)
- Restore that file, run eclipse again. -恢复该文件,再次运行eclipse。 Working ! 工作!

I hope this can help. 希望对您有所帮助。

Eclipse might have crashed so Please check the Jar in eclipse is present or not in path "eclipse\\plugins" , File Name ' org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348 ' . Eclipse可能已崩溃,因此请检查路径“ eclipse \\ plugins”(文件名为org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348 )中是否存在eclipse中的Jar。 If its their then close the eclipse and try to reopen the eclipse again. 如果是,则关闭月食并尝试重新打开月食。

If it doesn't work out the try to remove the Jaspersoft Plugin and restart again. 如果仍然无法解决,请尝试删除Jaspersoft插件,然后重新启动。 There might be issue in the plugin or installation error. 插件或安装错误可能存在问题。

Adding more suggestions 添加更多建议

Eclipse may have crashed sometime before and is unable to restore the workspace (the metadata stored by the eclipse might be corrupted). Eclipse可能在某个时候崩溃了,并且无法还原工作空间(eclipse存储的元数据可能已损坏)。

So try to use a new workspace. 因此,尝试使用新的工作区。 To force the workspace window prompt you need to change the settings in the file. 要强制工作区窗口提示,您需要更改文件中的设置。

File Name : \\configuration.settings\\org.eclipse.ui.ide.prefs and set SHOW_WORKSPACE_SELECTION_DIALOG to true (use Notepad++ to edit). 文件名:\\ configuration.settings \\ org.eclipse.ui.ide.prefs并将SHOW_WORKSPACE_SELECTION_DIALOG设置为true(使用Notepad ++进行编辑)。

After that you can import all your projects to the new workspace.. 之后,您可以将所有项目导入到新的工作区中。

If you still getting issues in startup , please post some pics and exact eclipse exit code.. we can dig more on to it.. 如果您在启动时仍然遇到问题,请发布一些图片和确切的eclipse退出代码..我们可以为您提供更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM