Eclipse在Mac OSX上启动时失败

时间:2011-12-06 17:43:04

标签: java eclipse macos

由于我已经为Eclipse下载了全新安装,因此无法启动。出现错误消息“发生错误请参阅日志文件/Applications/eclipse/configuration/1323191649568.log。”

在重新安装之前,我已经多次删除了有关Eclipse和Java Runtime的所有文件和文件夹。而且,命令./eclipse -clean给了我同样的错误。

有什么想法吗?

这里是日志:

!SESSION 2011-12-07 01:27:30.742 -----------------------------------------------
eclipse.buildId=M20110909-1335
java.version=1.6.0_29
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product -keyring /Users/Julien/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86 -product org.eclipse.epp.package.java.product -keyring /Users/Julien/.eclipse_keyring -showlocation

!ENTRY org.eclipse.equinox.p2.core 4 0 2011-12-07 01:27:31.721
!MESSAGE Provisioning exception
!STACK 1
org.eclipse.equinox.p2.core.ProvisionException: Unknown repository type at file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/.
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:393)
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.doCreateRepository(AbstractRepositoryManager.java:282)
    at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.createRepository(MetadataRepositoryManager.java:41)
    at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.initializeMetadataRepository(RepositoryListener.java:109)
    at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.<init>(RepositoryListener.java:59)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.<init>(DropinsRepositoryListener.java:82)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:532)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:172)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.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)
!SUBENTRY 1 org.eclipse.equinox.p2.metadata.repository 4 1005 2011-12-07 01:27:31.722
!MESSAGE Unknown repository type at file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/.

!ENTRY org.eclipse.equinox.p2.reconciler.dropins 4 0 2011-12-07 01:27:31.725
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start() of bundle org.eclipse.equinox.p2.reconciler.dropins.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.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.lang.IllegalStateException: Could not create metadata repository for: file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/
    at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.initializeMetadataRepository(RepositoryListener.java:112)
    at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.<init>(RepositoryListener.java:59)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.<init>(DropinsRepositoryListener.java:82)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:532)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:172)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
    ... 12 more
Root exception:
java.lang.IllegalStateException: Could not create metadata repository for: file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/
    at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.initializeMetadataRepository(RepositoryListener.java:112)
    at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.<init>(RepositoryListener.java:59)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.<init>(DropinsRepositoryListener.java:82)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:532)
    at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:172)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.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 4 0 2011-12-07 01:27:31.810
!MESSAGE Application error
!STACK 1
org.osgi.service.application.ApplicationException: No application id has been found.
    at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:262)
    at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
    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:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

6 个答案:

答案 0 :(得分:8)

尝试删除:
/YOUR PATH TO WORKSPACE/.metadata/.plugins/org.eclipse.core.resources

答案 1 :(得分:5)

最后,我自己解决了我的问题。

我“简单地”重新安装了Java。操作有点棘手,因为Java是OSX系统的一部分,它不应该被卸载。

如何在OSX上卸载Java?

从Apple网站下载最新更新(适用于OS X Lion Update 1的Java - http://support.apple.com/kb/DL1421

  1. 删除/ Library / Java,/ System / Library / Java,Library / Caches / Java文件夹

  2. 使用root(sudo -s)

  3. 打开终端
  4. 终端:pkgutil --packages | grep java

  5. 终端:pkgutil --forget com.apple.pkg.xxxxx(关于Java的一切)

  6. 插入Mac OS X DVD

  7. 终端:installer -verbose -pkg "/Volumes/Mac OS X Install DVD/System/Installation/Packages/Java.pkg" -target "/Volumes/Macintosh HD"

  8. 终端:installer -verbose -pkg "/Volumes/Mac OS X Install DVD/System/Installation/Packages/JavaTools.pkg" -target "/Volumes/Macintosh HD"

  9. 安装以前下载的OS X for

  10. 重新启动

  11. 如果需要,可以进行软件更新。

  12. 来源:http://hints.macworld.com/article.php?story=2009051215025819

答案 2 :(得分:4)

尝试一些建议:my eclipse stopped working today

特别是使用终端来运行

  

./ eclipse -clean

其他可能的解决方案是:

下载所有Eclipse / Java部件时,请务必保存并解压缩到HFS +分区。如果你有一个FAT32分区并保存/解压到那里,那将导致安装问题(它发生在我身上)。

此外,32位/ 64位安装程序可能存在问题..请务必选择正确的

答案 3 :(得分:3)

尝试删除整个元数据文件夹

  

/您对WORKSPACE / .metadata的路径

答案 4 :(得分:1)

从工作区目录中删除名为“.lock”的隐藏文件,这应该可以解决问题。

答案 5 :(得分:1)

我遇到了类似的问题。日食没有在Mac系统中加载。

链接中提供的推荐解决方案: Eclipse Kepler crashes in a certain workspace

根据建议,我删除了两个:

1)eclipse-workspace / .metadata / .plugins / org.eclipse.core.resources

2).metadata / .plugins / org.eclipse.e4.workbench / workbench.xmi

现在eclipse正在加载而没有任何问题。