NullPointerException,在build-impl.xml中使用Netbeans Profiler

时间:2019-05-27 12:16:39

标签: java netbeans profiler

我想使用Netbeans探查器对Java项目进行探查,但是在build-impl.xml中立即获得了NullPointerExcpetion

我的环境:

  • 产品版本:Apache NetBeans IDE 11.0(在20190319上构建incubator-netbeans-release-404-on)
  • 更新:NetBeans IDE已更新为版本NetBeans 8.2 Patch 2
  • Java :11.0.3; OpenJDK 64位服务器VM 11.0.3 + 7-suse-lp151.2.1-x8664
  • 运行时:OpenJDK运行时环境11.0.3 + 7-suse-lp151.2.1-x8664
  • 系统:Linux版本4.12.14-lp151.27-默认在amd64上运行; UTF-8; zh_(nb)

选择“配置文件”>“配置文件项目”时,将打开一个窗口。按下按钮“配置文件”,将产生以下输出:

ant -f /home/whoami/NetBeansProjects/vplg/plcc -Dnb.internal.action.name=profile -Drun.class=plcc.Main "-Drun.jvmargs.ide= -agentpath:/usr/lib64/netbeans/profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so=/usr/lib64/netbeans/profiler/lib,5140,10 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/whoami/NetBeansProjects/vplg/plcc/nbproject/private/profiler " profile
init:
profile-init:
Deleting: /home/whoami/NetBeansProjects/vplg/plcc/build/built-jar.properties
deps-jar:
Updating property file: /home/whoami/NetBeansProjects/vplg/plcc/build/built-jar.properties
compile:
profile:
/home/whoami/NetBeansProjects/vplg/plcc/nbproject/build-impl.xml:1166: 
java.lang.NullPointerException
    at org.netbeans.modules.profiler.NetBeansProfiler.runCalibration(NetBeansProfiler.java:1251)
    at org.netbeans.modules.profiler.NetBeansProfiler.startEx(NetBeansProfiler.java:1665)
    at org.netbeans.modules.profiler.nbimpl.StartProfilerTask.execute(StartProfilerTask.java:65)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at jdk.internal.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
    at org.apache.tools.ant.Task.perform(Task.java:350)
    at org.apache.tools.ant.Target.execute(Target.java:449)
    at org.apache.tools.ant.Target.performTasks(Target.java:470)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)
BUILD FAILED (total time: 0 seconds)

这是我第一次使用Netbeans探查器,如果您能帮助我使其正常工作,将不胜感激。目前,我不知道出了什么问题(由项目自己编译),build-impl.xml的真正含义以及为什么会产生NullPointerException。

这是围绕异常的代码(第1166行):

1165 <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1166        <startprofiler/>
1167        <antcall target="run"/>
1168 </target>

在此先感谢您的帮助!

0 个答案:

没有答案