[
https://issues.apache.org/jira/browse/MCOMPILER-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17146609#comment-17146609
]
Benjamin Marwell commented on MCOMPILER-394:
--------------------------------------------
I think I ran into this some time ago as well.
> Can you try a different Java version?
> We tried 1.8.0_172, 1.8.0_211 and 1.8.0_221: All the same result.
> Unfortunately our sources are not compatible to Java 11, so I couldn't try 11.
But I remember I switched to adopt-openj9 JDK 11 and the problem went away.
Judging from your post, you only tried oracle versions. You should easily be
able to test with Java 11 with only a few small tweaks:
* Download adopt-openj9 or adopt-hotspot from adoptopenjdk.net. Those are
Eclipse Adoptium implementations of OpenJDK with Hotspot JVM and OpenJDK with
Eclipse OpenJ9 JVM.
* Either set {{maven.compiler.release}} to 8 or both {{maven.compiler.target}}
and {{maven.compiler.source}} to 1.8
* You might need just a handful dependencies. Usually it just comes down to
the javax/jakarta annotation api and javax/jakarta xml bind API.
That should usually do it, at least for the majority of projects. Depending of
how you organised your projects, this might be done in a few minutes.
> Stackoverflow while compiling Java Sources, but works after renaming project
> directory
> --------------------------------------------------------------------------------------
>
> Key: MCOMPILER-394
> URL: https://issues.apache.org/jira/browse/MCOMPILER-394
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.1
> Environment: The problem occurs with Windows 10, Windows 7 and also
> with Ubuntu.
> Reporter: Markus Bader
> Priority: Major
> Attachments: build.log
>
>
> Me and one of my colleagues have following problem (others do not): We want
> to build a maven project, but "mvn clean install" ends up in a stackoverflow
> error. But after renaming the project directory, it works. Also after
> renaming the name of the parent directory and leaving the name of the project
> directory by its original value, compilation is possible.
> I also tried changing the artifactId so that it doesn't match the folder
> name. Result: stackoverflow.
> To make it more strange: I tried to reduce the used Java classes for possibly
> identifying a class to be responsible for this phenomenon. Therefor I deleted
> a class named "MathParser" and after that compilation was possible. So I
> analysed the content of the class and found out, that the stackoverflow error
> occurs even if the class ist nearly empty. With following content I can
> reproduce the error:
>
> {code:java}
> package some.anonymised.package;
> public class MathParser {
> private void doSomething(String func) throws Exception {
> throw new Exception ("function '" + func + "' is not defined");
> }
> } {code}
> With an empty method body, the build works fine.
> I attached the log created with debug option activated (with reduced number
> of classes and reduced content of MathParser). For anonymisation purposes I
> replaced the name of some directories, packages etc. by "xxxxx".
--
This message was sent by Atlassian Jira
(v8.3.4#803005)