从插件调用代码时出现问题:“org.eclipse.core.resources”

时间:2012-08-31 04:42:21

标签: eclipse

如何解决上述报告的错误消息?其他详细信息如下:

异常堆栈跟踪

java.lang.NullPointerException
    at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2843)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1878)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3128)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2691)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2855)
    at org.eclipse.jdt.internal.core.ClasspathChange.generateDelta(ClasspathChange.java:220)
    at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2052)
    at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:470)
    at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
    at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:395)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1530)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2353)
    at org.eclipse.wst.jsdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2153)
    at org.eclipse.wst.jsdt.internal.core.JavaModelManager.getJsGlobalScopeContainer(JavaModelManager.java:1530)
    at org.eclipse.wst.jsdt.core.JavaScriptCore.getJsGlobalScopeContainer(JavaScriptCore.java:1319)
    at org.eclipse.wst.jsdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2740)
    at org.eclipse.wst.jsdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2019)
    at org.eclipse.wst.jsdt.core.JavaScriptCore.initializeAfterLoad(JavaScriptCore.java:2655)
    at org.eclipse.wst.jsdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:32)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

会话数据

eclipse.buildId=I20120608-1400
java.version=1.7.0_08-ea
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product -keyring /Users/ravisankars/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/ravisankars/.eclipse_keyring -showlocation

3 个答案:

答案 0 :(得分:2)

我做过的一件事(虽然我建议首先卸载并重新安装插件,如先前由@Rajkumar发布的)是删除导致问题的构建器。 MyProject - >属性 - >建筑商...... [麻烦的建造者] ......删除。

这是一个短期解决方案,你只是在规避真正的问题,但对我来说,它确实是我现在所需要的。

答案 1 :(得分:1)

自从我第一次安装Eclipse以来发生了很多事情,比如(a)安装/卸载插件(b)升级IDE而不相应地升级工作区。由于历史变得复杂,故障排除也变得棘手。全新安装以及再次导入代码库,为我解决了问题。

答案 2 :(得分:0)

如果你的eclipse项目中有许多像java脚本这样的资源文件会发生类似的问题。解决方案是从项目构面中删除java脚本性质或禁用java脚本验证。