views:

146

answers:

3

While compiling my project I get:

The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
    at com.sun.tools.javac.code.Type$WildcardType.isSuperBound(Type.java:435)
    at com.sun.tools.javac.code.Types$1.visitWildcardType(Types.java:102)
    at com.sun.tools.javac.code.Types$1.visitWildcardType(Types.java:98)
    at com.sun.tools.javac.code.Type$WildcardType.accept(Type.java:416)
    at com.sun.tools.javac.code.Types$MapVisitor.visit(Types.java:3232)
    at com.sun.tools.javac.code.Types.upperBound(Types.java:95)
    at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2986)
    at com.sun.tools.javac.code.Types.adapt(Types.java:3016)
    at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2977)
    at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2986)
    at com.sun.tools.javac.code.Types.adapt(Types.java:3016)
    at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2977)
    at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2986)
    at com.sun.tools.javac.code.Types.adapt(Types.java:3016)
    at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2977)
    at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2986)
    at com.sun.tools.javac.code.Types.adapt(Types.java:3016)
    ...

How do you find the root of the problem?

I have found a bug report...

A: 

I would start by running javac with the -verbose option to see which .java file was causing the problem.

Simon Nickerson
It tells me nothing... It is loading java.lang.Math and throws this thing.
etam
+2  A: 

The bug report you linked to indicates that the bug was fixed in JDK 6. Which version of the JDK are you using to build?

If you can't identify the part of your source that is causing the problem, perhaps you could try compiling with JDK 6 to see if it can identify the problem without crashing.

Otherwise, I would use the "divide and conquer" approach: Remove half your source code, compile, and see if it still crashes. Depending on whether it does or not, you will know which half the problem is in. Repeat.

Greg Hewgill
I am using 1.6 :/.
etam
Which version? Try the latest released - u16. If you dare, go to u18 ( pre-release ).
Robert Munteanu
I am using Mac...
etam
A: 

What about trying a different compiler, like the one in Eclipse? It's error messages are at least different, in my experience often more to the point. Also I haven't seen compilation failures like this yet.

the.duckman