错误:
无法打开编辑器:无法实例化编辑器类。 这通常表示缺少no-arg构造函数或者 编辑器的类名在plugin.xml中输入错误。
备注:
堆栈跟踪
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.jdt.ui (150).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
at org.eclipse.ui.internal.EditorManager.createPart(EditorManager.java:845)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1429)
at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:942)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
Caused by: org.osgi.framework.BundleException: The activator org.eclipse.jdt.internal.ui.JavaPlugin for bundle org.eclipse.jdt.ui is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
... 57 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/core/IBufferFactory
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
... 63 more
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.jdt.core (140).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 69 more
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.jdt.core.JavaCore.start() of bundle org.eclipse.jdt.core.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
... 78 more
Caused by: java.lang.NullPointerException
at org.eclipse.core.runtime.Path.<init>(Path.java:183)
at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:181)
at org.eclipse.jdt.internal.core.ExternalFoldersManager.isExternalFolderPath(ExternalFoldersManager.java:90)
at org.eclipse.jdt.internal.core.JavaProject.addToResult(JavaProject.java:2738)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2688)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2783)
at org.eclipse.jdt.internal.core.DeltaProcessingState.getRootInfos(DeltaProcessingState.java:301)
at org.eclipse.jdt.internal.core.DeltaProcessingState.initializeRootsWithPreviousSession(DeltaProcessingState.java:271)
at org.eclipse.jdt.internal.core.JavaModelManager.startup(JavaModelManager.java:4712)
at org.eclipse.jdt.core.JavaCore.start(JavaCore.java:5048)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
... 84 more
修改
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
编辑2:
我改变了工作空间并解决了问题(至少对于新的工作空间)但仍然 - 不知道为什么会发生这种情况。 (虽然我仍然很好奇,所以我把这个问题打开了。)
答案 0 :(得分:30)
这通常是eclipse插件保存的临时文件的问题。 检查YOUR_WORKSPACE / .metadata / .plugins / org.eclipse.jdt.core / 有很多索引文件。有时删除它们会有所帮助。 也可以用-clean开始你的日食。
但我认为你的问题略有不同。 您是否在文件系统中的某个位置引用了库(jar文件)? 如果您删除它或移动它,eclipse就无法构建您的项目。
您刷新了所有项目吗?
最好的问候弗洛里安
答案 1 :(得分:12)
虽然我的日食更新,我也遇到了同样的问题 - 4.2(朱诺)。对我来说,解决方案是删除<workspace>/.metadata/.plugins/org.eclipse.core.resources/.snap
。之后我在eclipse.org中发现了这个错误:Bug 178988 - Crash at startup due to ".snap" files。
希望这会对某人有所帮助。
答案 2 :(得分:3)
at org.eclipse.core.runtime.Path.<init>(Path.java:183)
at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:181)
at org.eclipse.jdt.internal.core.ExternalFoldersManager.isExternalFolderPath(ExternalFoldersManager.java:90)
at org.eclipse.jdt.internal.core.JavaProject.addToResult(JavaProject.java:2738)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2688)
堆栈跟踪似乎表明您的类路径存在问题。
编辑:另一个想法......在其他工作区上启动eclipse。然后使用产生错误的工作空间为“Eclipse Configuration”创建启动配置。为NullPointerException设置java异常断点。从调试模式开始,您可以检查变量以查看产生问题的路径。
答案 3 :(得分:3)
谷歌这个错误,你在各种(Eclipse)IDE和插件中获得了大量的点击。似乎没有真正“修复”的记录,除了您发现创建新工作区的位置。
3.6.2.r362_v20110210是我正在运行的版本。你确定你在使用3.6.2吗?您首先编辑列表
-startup 插件/ org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar --launcher.library 插件/ org.eclipse.equinox.launcher.win32.win32.x86_1.1.2。的 R36x_v20101222 强>
似乎指向旧版本。 击>
我同意另一张海报,你绝对应该在Eclipse的bugtracking系统上搜索和/或发布这个海报。这是您使用开源软件时所能做的最少的事情。
答案 4 :(得分:1)
我尝试了几个选项
<workspace>/.metadata/.plugins/org.eclipse.jdt.core
<workspace>/.metadata/.plugins/org.eclipse.core.resources/.snap
-clean
作为启动参数-initialize
作为启动参数但我一直随机收回错误。
到目前为止,唯一可行的选项是删除.snap文件,第一次在删除.snap文件后启动eclipse工作正常。
我们也可以在新工作区中启动它;它工作正常。但出于这个原因,我们讨厌切换工作区。
此外,如果我们关闭并重新启动eclipse,问题会随机出现。
答案 5 :(得分:0)
我在FlashBuilder 4.7中得到了这个。这是一个权限问题。在Mac OSX上,从信息框中,我给了我的用户READ&amp; WRITE访问Flash Builder 4.7文件夹,然后执行“Apply to enclosed items ...”并修复它。
答案 6 :(得分:0)
解决上述问题的方法是去 workspace.metadata.plugins \ org.eclipse.jdt.core&amp;删除所有索引文件。
感谢FlorianOver
答案 7 :(得分:0)
有同样的问题(在Indigo 3.7上)和正确版本的jadclipse jar(net.sf.jadclipse_3.3.0.jar和Jad 1.5.8g)为我做了
答案 8 :(得分:0)
按照其他人的建议删除索引文件在我的情况下没有帮助。我不得不重置视角:右键单击&#34; Java&#34;右上角的透视切换按钮,选择&#34;重置&#34;。至少它比重建整个工作区要好。
答案 9 :(得分:0)
对我来说,删除workspace / .metadata / .lock然后使用eclipse -clean -refresh重新启动
答案 10 :(得分:0)
这很简单。右键单击该类,然后选择“ /使用/打开Java编辑器”或“通用文本编辑器”选项。
简单的方法。
答案 11 :(得分:0)
当我遇到这个问题时。我简单地更新了日食并解决了问题。
答案 12 :(得分:0)
一个对我有用的解决方案(首先尝试了上面列出的其他更准确的步骤失败后)是执行以下操作:
此问题已得到解决。但是,缺点是您必须在执行步骤之后再次导入项目。
答案 13 :(得分:-1)
我遇到了同样的问题。这基本上是由 jadclipse jar的版本不匹配引起的。最初我有admin
,但后来更新为jadclipse_3.2.1.jar
。解决了这个问题。