• 解决Run As -> Java Application不能运行问题


    转自:https://breakshell.iteye.com/blog/467130

       点 Run As -> Java Application 不能运行,报的错误如下:

    Java代码  收藏代码
    1. Plug-in org.eclipse.ajdt.ui was unable to load class org.eclipse.ajdt.internal.ui.ajde.CachedRuntimeClasspathEntryResolver.  
    2.   
    3. org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.ajdt.ui (745).  
    4. at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)  
    5. at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)  
    6. at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)  
    7. at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376)  
    8. at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:452)  
    9. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)  
    10. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)  
    11. at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)  
    12. at java.lang.ClassLoader.loadClass(Unknown Source)  
    13. at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:321)  
    14. at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)  
    15. at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)  
    16. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)  
    17. at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)  
    18. at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)  
    19. at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)  
    20. at org.eclipse.jdt.internal.launching.RuntimeClasspathEntryResolver.getResolver(RuntimeClasspathEntryResolver.java:52)  
    21. at org.eclipse.jdt.internal.launching.RuntimeClasspathEntryResolver.resolveRuntimeClasspathEntry(RuntimeClasspathEntryResolver.java:44)  
    22. at org.eclipse.jdt.launching.JavaRuntime.resolveRuntimeClasspathEntry(JavaRuntime.java:924)  
    23. at org.eclipse.jdt.launching.StandardClasspathProvider.resolveClasspath(StandardClasspathProvider.java:75)  
    24. at org.eclipse.jdt.launching.JavaRuntime.resolveRuntimeClasspath(JavaRuntime.java:1205)  
    25. at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.getClasspath(AbstractJavaLaunchConfigurationDelegate.java:417)  
    26. at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:71)  
    27. at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)  
    28. at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)  
    29. at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)  
    30. at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)  
    31. at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)  
    32. Caused by: org.osgi.framework.BundleException: The activator org.eclipse.ajdt.ui.AspectJUIPlugin for bundle org.eclipse.ajdt.ui is invalid  
    33. at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:157)  
    34. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:750)  
    35. at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)  
    36. at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)  
    37. at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)  
    38. at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)  
    39. ... 27 more  
    40. Caused by: java.lang.NoClassDefFoundError: org/eclipse/ajdt/core/ras/FFDC  
    41. at java.lang.Class.getDeclaredConstructors0(Native Method)  
    42. at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)  
    43. at java.lang.Class.getConstructor0(Unknown Source)  
    44. at java.lang.Class.newInstance0(Unknown Source)  
    45. at java.lang.Class.newInstance(Unknown Source)  
    46. at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:152)  
    47. ... 32 more  
    48. Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.ajdt.core (740).  
    49. at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)  
    50. at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)  
    51. at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)  
    52. at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376)  
    53. at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)  
    54. at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:440)  
    55. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)  
    56. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)  
    57. at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)  
    58. at java.lang.ClassLoader.loadClass(Unknown Source)  
    59. at java.lang.ClassLoader.loadClassInternal(Unknown Source)  
    60. at java.lang.Class.forName0(Native Method)  
    61. at java.lang.Class.forName(Unknown Source)  
    62. at org.springframework.ide.eclipse.core.java.JdtUtils.isAjdtPresent(JdtUtils.java:383)  
    63. at org.springframework.ide.eclipse.core.java.JdtUtils.<clinit>(JdtUtils.java:73)  
    64. at org.springframework.ide.eclipse.aop.core.internal.model.AopResourceChangeEvents.isSpringProject(AopResourceChangeEvents.java:33)  
    65. at org.springframework.ide.eclipse.core.internal.model.resources.SpringResourceChangeListener$SpringResourceVisitor.resourceChanged(SpringResourceChangeListener.java:216)  
    66. at org.springframework.ide.eclipse.core.internal.model.resources.SpringResourceChangeListener$SpringResourceVisitor.visit(SpringResourceChangeListener.java:143)  
    67. at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)  
    68. at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)  
    69. at org.springframework.ide.eclipse.core.internal.model.resources.SpringResourceChangeListener.resourceChanged(SpringResourceChangeListener.java:75)  
    70. at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)  
    71. at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)  
    72. at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)  
    73. at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)  
    74. at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:297)  
    75. at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:136)  
    76. at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)  
    77. ... 1 more  
    78. Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.ajdt.core.AspectJPlugin.start() of bundle org.eclipse.ajdt.core.  
    79. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805)  
    80. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)  
    81. at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)  
    82. at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)  
    83. at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)  
    84. at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)  
    85. ... 28 more  
    86. Caused by: java.lang.NoClassDefFoundError: org/aspectj/ajde/core/ICompilerConfiguration  
    87. at org.eclipse.ajdt.core.AspectJPlugin.start(AspectJPlugin.java:131)  
    88. at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)  
    89. at java.security.AccessController.doPrivileged(Native Method)  
    90. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)  
    91. ... 33 more  
    92. Caused by: java.lang.ClassNotFoundException: org.aspectj.ajde.core.ICompilerConfiguration  
    93. at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)  
    94. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)  
    95. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)  
    96. at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)  
    97. at java.lang.ClassLoader.loadClass(Unknown Source)  
    98. at java.lang.ClassLoader.loadClassInternal(Unknown Source)  
    99. ... 37 more  
    100.   
    101.   
    102.   
    103. eclipse.buildId=I20090611-1540  
    104. java.version=1.6.0_16  
    105. java.vendor=Sun Microsystems Inc.  
    106. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN  
    107. Framework arguments:  -product org.eclipse.epp.package.jee.product  
    108. Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product  

    我的Eclipse3.5版本是:

    Eclipse Java EE IDE for Web Developers.

    Build id: 20090621-0832

    原来是我之前安装Maven插件的时候选择安装了AJDT,只要不安装AJDT插件,程序运行正常。

    我想这个应该是AJDT的一个BUG吧。。。

  • 相关阅读:
    剖析HBase负载均衡和性能指标
    Hadoop大数据挖掘从入门到进阶实战
    实战Kafka ACL机制
    论文笔记系列--MnasNet:Platform-Aware Neural Architecture Search for Mobile
    在 Vim 中优雅地查找和替换
    VIM的列编辑操作
    理解Pytorch中LSTM的输入输出参数含义
    Python为什么要用抽象类(abc模块)?
    概率密度估计介绍
    Docker永久挂载本地目录
  • 原文地址:https://www.cnblogs.com/sharpest/p/10468669.html
Copyright © 2020-2023  润新知