Ecilpse Java Builder started failing

I've been using this Eclipse installation for over a year now. All of the sudden the builder started failing. I haven't changed any settings. The only thing could have created this situation is Eclipse had a hard crash and then the builder started producing these NPE's...

!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)

Can anyone help me figure out how to get the builder working again?

Answers


Figured it out after hours of banging my head.

Eclipse crashed while I was in the middle of writing code. So the code that existed when I restarted Eclipse looked something like this...

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();
    }
}

When I restarted Eclipse I saw all the compilation NPE's and never thought to look at the code I was working on. I would have expected Eclipse to tell me about the syntax error before recompiling the project.

I discovered the syntax error when I attempted to compile my project via the command line and outside of Eclipse.

IMHO its a bug.


The crash could have left your workspace in an inconsistent state, which may be resulting you in finding a corner case in the Java Builder that isn't handled correctly.

Try refreshing all of your projects and then running clean build.


Hi this is the problem created by heapdumps delete the temp files and restart the eclipse and build ur project again if u face the issue after 4 5 builds do the same thing


Need Your Help

Bootstrapper with custom package

msbuild bootstrapper

I'm currently developping a bootstrapper to deploy one of my VSTO addins.