2

一年多来,我一直在 Eclipse 中使用 JProfiler 7,但我的 Eclipse 似乎定期进入无法再运行 Profile 的状态,并且我从 Eclipse 内部获得 NullPointerException。运行以前有效的配置文件时,我收到以下错误:

An internal error occurred during: "Launching TestMain".

java.lang.NullPointerException
    at org.eclipse.jdt.internal.launching.JavaSourceLookupUtil.getPackageFragmentRoot(JavaSourceLookupUtil.java:156)
    at org.eclipse.jdt.internal.launching.JavaSourceLookupUtil.translate(JavaSourceLookupUtil.java:57)
    at org.eclipse.jdt.launching.JavaRuntime.getSourceContainers(JavaRuntime.java:2435)
    at org.eclipse.jdt.launching.sourcelookup.containers.JavaSourcePathComputer.computeSourceContainers(JavaSourcePathComputer.java:58)
    at org.eclipse.debug.internal.core.sourcelookup.SourcePathComputer.computeSourceContainers(SourcePathComputer.java:69)
    at org.eclipse.debug.core.sourcelookup.containers.DefaultSourceContainer.createSourceContainers(DefaultSourceContainer.java:112)
    at org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer.getSourceContainers(CompositeSourceContainer.java:130)
    at com.jprofiler.integrations.eclipse.a.f.a(ejt:243)
    at com.jprofiler.integrations.eclipse.a.f.j(ejt:230)
    at com.jprofiler.integrations.eclipse.a.f.<init>(ejt:70)
    at com.jprofiler.integrations.eclipse.a.b.a(ejt:39)
    at com.jprofiler.integrations.eclipse.a.b.a(ejt:27)
    at com.jprofiler.integrations.eclipse.delegates.LocalJavaDelegate.launch(ejt:18)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

它在源代码查找中失败的事实很有趣,因为我最近在 Eclipse 中也遇到了问题,通常是 IDE 无法解析源文件位置(即使对于我的项目中的常规旧 Java 文件或导入的项目),我必须手动重新设置源查找(使用“附加源”按钮)。所以不确定这是否真的是 JProfiler 问题或基本的 Eclipse 问题。

当我第一次遇到这个问题时,我最初是在 Eclipse Indigo 中工作的,所以我升级到 Juno 并解决了问题,但它现在又回来了,我不知道为什么:) 我也尝试过重新做JProfiler IDE 集成向导,但这没有帮助。

  • 瑞克
4

1 回答 1

0

每当我遇到类似的奇怪的 Eclipse 错误时,我通常只是下载/重新安装最新版本。如果它是 eclipse 内部的东西,我建议你提交一个错误报告,重新安装,然后继续工作。这样做很烦人,但从长远来看,你会浪费更少的时间。

如果您想向使 eclipse 成为可能的人提交有用的错误报告: https ://bugs.eclipse.org/bugs/

于 2013-02-14T17:10:52.023 回答