5

我已经使用这个 Eclipse 安装一年多了。突然间,建造者开始失败。我没有更改任何设置。唯一可能造成这种情况的是 Eclipse 发生了严重崩溃,然后构建器开始生产这些 NPE ......

!SESSION 2012-09-12 13:40:37.149 -----------------------------------------------
eclipse.buildId=M20120208-0800
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.core.resources 4 2 2012-09-12 13:46:08.705
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
    at org.eclipse.jdt.internal.compiler.apt.dispatch.AnnotationDiscoveryVisitor.visit(AnnotationDiscoveryVisitor.java:61)
    at org.eclipse.jdt.internal.compiler.ast.Argument.traverse(Argument.java:160)
    at org.eclipse.jdt.internal.compiler.ast.TryStatement.traverse(TryStatement.java:1080)
    at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:112)
    at org.eclipse.jdt.internal.compiler.ast.Initializer.traverse(Initializer.java:128)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1304)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:690)
    at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundEnvImpl.<init>(RoundEnvImpl.java:58)
    at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:148)
    at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
    at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.core.resources 4 75 2012-09-12 13:46:09.643
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2012-09-12 13:46:09.643
!MESSAGE Errors running builder 'Java Builder' on project 'cust_Windchill_src'.
!STACK 0
java.lang.NullPointerException
    at org.eclipse.jdt.internal.compiler.apt.dispatch.AnnotationDiscoveryVisitor.visit(AnnotationDiscoveryVisitor.java:61)
    at org.eclipse.jdt.internal.compiler.ast.Argument.traverse(Argument.java:160)
    at org.eclipse.jdt.internal.compiler.ast.TryStatement.traverse(TryStatement.java:1080)
    at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:112)
    at org.eclipse.jdt.internal.compiler.ast.Initializer.traverse(Initializer.java:128)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1304)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:690)
    at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundEnvImpl.<init>(RoundEnvImpl.java:58)
    at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:148)
    at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
    at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

谁能帮我弄清楚如何让建造者再次工作?

4

3 回答 3

3

经过几个小时的敲打我的头后想通了。

在我写代码的过程中,Eclipse 崩溃了。所以当我重新启动 Eclipse 时存在的代码看起来像这样......

public abstract class AbstractAmbassadorQueueTask implements AmbassadorQueueTask{

    // BEGIN: This is where I was working when Eclipse crashed.
    private static SessionListenerIfc l = new SessionListenerAdapter(){

    } // <<< **Note the missing semicolon after the last brace.**
    // END: This is where I was working when Eclipse crashed.

    public AbstractAmbassadorQueueTask() {
        super();
    }
}

当我重新启动 Eclipse 时,我看到了所有的编译 NPE,并且从未想过要查看我正在处理的代码。我本来希望 Eclipse 在重新编译项目之前告诉我语法错误。

当我尝试通过命令行和 Eclipse 外部编译我的项目时,我发现了语法错误。

恕我直言,这是一个错误。

于 2012-09-12T23:58:05.473 回答
0

崩溃可能会使您的工作区处于不一致的状态,这可能会导致您在 Java Builder 中发现一个未正确处理的极端情况。

尝试刷新所有项目,然后运行 ​​clean build。

于 2012-09-12T18:37:26.303 回答
0

嗨,这是由 heapdumps 造成的问题,删除临时文件并重新启动 eclipse 并再次构建您的项目,如果您在 4 5 个构建后遇到问题做同样的事情

于 2016-03-16T08:58:37.153 回答