Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » StackOverflow error during project build(After Java 8 migration I am getting a StackOverflow error during project build)
StackOverflow error during project build [message #1717218] Thu, 10 December 2015 14:38 Go to next message
Eclipse UserFriend
Hi,

I am in the process of migrating a web app to Java 8. I can build the project outside of Eclipse with no issues, but I am seeing strange errors inside the ide. First of all, a few of the projects (4 out of 25) used in the application are showing errors that do not make any sense. For any object that implements the collection interface, I see an error saying "the type X is not generic it cannot be parameterized with arguments ." For example:

index.php/fa/24275/0/

It is a java.util.collection. I get the same error for decedent types as well.... eg.. map, tree, ArrayList... etc.

Also, when I do a project->clean, Eclipse throws a StackOverflow error when building these projects. This is the trace from the log:

!ENTRY org.eclipse.core.jobs 4 2 2015-12-09 15:50:54.309
!MESSAGE An internal error occurred during: "Build Project".
!STACK 0
java.lang.StackOverflowError
at     org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substituteInferenceVariable(ParameterizedTypeBinding.java:856)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substituteInferenceVariable(ParameterizedTypeBinding.java:856)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substituteInferenceVariable(ParameterizedTypeBinding.java:856)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substituteInferenceVariable(ParameterizedTypeBinding.java:856)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substituteInferenceVariable(ParameterizedTypeBinding.java:856)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substituteInferenceVariable(ParameterizedTypeBinding.java:856)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substituteInferenceVariable(ParameterizedTypeBinding.java:856)
.
.
.
repeating


I am seeing these errors in two different Eclipse environments. STS 3.6.2 and Mars 4.5.1. Anyone have any idea what's going on here?

Thanks!
  • Attachment: example.png
    (Size: 7.32KB, Downloaded 3817 times)
Re: StackOverflow error during project build [message #1717315 is a reply to message #1717218] Fri, 11 December 2015 11:16 Go to previous messageGo to next message
Eclipse UserFriend
For a start could you please check the JRE referenced in your projects? Is it referenced as an Execution Environment or as a JRE? What does it actually point to?
What are the exact compliance settings in the Java Compiler preferences?
Re: StackOverflow error during project build [message #1717344 is a reply to message #1717315] Fri, 11 December 2015 18:12 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the reply. The JRE referenced in the projects is 1.8. It is referenced as a JRE. Compiler compliance level is also set to 1.8. See images below:

index.php/fa/24290/0/

index.php/fa/24291/0/

  • Attachment: p2.PNG
    (Size: 18.09KB, Downloaded 3566 times)
  • Attachment: p1.PNG
    (Size: 20.21KB, Downloaded 3530 times)
Re: StackOverflow error during project build [message #1717345 is a reply to message #1717344] Fri, 11 December 2015 18:23 Go to previous messageGo to next message
Eclipse UserFriend
At the surface all looks good, so let's look below the surface:
Could you please paste the exact version of your org.eclipse.jdt.core jar file (in plugins)?

Point in favor: In that version of class ParameterizedTypeBinding that was released for 4.5.1, method substituteInferenceVariable() *starts* at line 869, which doesn't match to the pasted stack trace.
Re: StackOverflow error during project build [message #1717347 is a reply to message #1717345] Fri, 11 December 2015 18:30 Go to previous messageGo to next message
Eclipse UserFriend
See Image below:

index.php/fa/24292/0/

  • Attachment: p3.PNG
    (Size: 7.56KB, Downloaded 3376 times)
Re: StackOverflow error during project build [message #1717348 is a reply to message #1717347] Fri, 11 December 2015 18:33 Go to previous messageGo to next message
Eclipse UserFriend
The previous post was from Mars. This is from STS:

index.php/fa/24293/0/

  • Attachment: p4.PNG
    (Size: 7.36KB, Downloaded 3370 times)
Re: StackOverflow error during project build [message #1717352 is a reply to message #1717348] Fri, 11 December 2015 18:48 Go to previous messageGo to next message
Eclipse UserFriend
The version org.eclipse.jdt.core_3.11.1.v20150902-1521.jar can impossibly create the stack trace shown above (due to mismatching line numbers).

The newer of the two versions from STS corresponds to the feature patch for Java 8 on Eclipse Kepler that was released on the same day as the Java 8 release (i.e., the very first release version of Eclipse with support for Java Eight). From that release, line numbers match to the given stack trace. Here the stackoverflow can actually be identified as https://bugs.eclipse.org/435463 which was fixed for the Luna release.

If you are seeing the same or a similar error in Mars (4.5.1) please paste the stack trace from that version.

best,
Stephan

PS: Time and again it's amazing how the forum renders Java Eight when in parantheses (Java Cool

[Updated on: Fri, 11 December 2015 18:51] by Moderator

Re: StackOverflow error during project build [message #1717353 is a reply to message #1717352] Fri, 11 December 2015 18:54 Go to previous messageGo to next message
Eclipse UserFriend
Thanks! I did see a similar stack trace from STS (the newer jar). I don't have my environment set up to reproduce it at the moment, but I'll be able to post it on Monday
Re: StackOverflow error during project build [message #1717354 is a reply to message #1717353] Fri, 11 December 2015 19:04 Go to previous message
Eclipse UserFriend
Matt Hempleman wrote on Sat, 12 December 2015 00:54
Thanks! I did see a similar stack trace from STS (the newer jar). I don't have my environment set up to reproduce it at the moment, but I'll be able to post it on Monday


The STS case (3.9.50...) is resolved, we need a stack from Mars.
Previous Topic:Cannot publish to the server because it is missing its runtime environment.
Next Topic:[Eclipse IDE for Java Developers] MacOSX 10.7 (Lion) Crash
Goto Forum:
  


Current Time: Sun Aug 17 23:40:48 EDT 2025

Powered by FUDForum. Page generated in 0.04760 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top