Question

I have a problem when i compile my classes with maven. The stacktrace looks like this:

[ERROR] Failure executing javac, but could not parse the error:
[ERROR] An exception has occurred in the compiler (1.7.0_51). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
[ERROR] java.lang.NullPointerException
[ERROR] at com.sun.tools.javac.code.Symbol$ClassSymbol.isSubClass(Symbol.java:804)
[ERROR] at com.sun.tools.javac.comp.Lower.accessClass(Lower.java:1023)

It's the same stacktrace like in the official bug page of oracle (JDK-6956758) but this bug encountered with 1.6.0_20 and is resolved at 2011-03-08 and as you can see my version is the 1.7.0_51. What can I do to get rid of the problem.

Was it helpful?

Solution

The problem was the following. I had something like this code:

public class Class extends AbstractClass {
    public void increaseSomething(){
        super.something++;
    }

    public void addSomethingElse(int value){
        super.somethingElse += value;
    }
}

After I deleted both super's the compiler runs successfully thru. I know that this was my failure but it would be nice if the compiler can print out such failure or the IDE could.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top