Issue
I have several Spring boot applications that I recently upgraded to Java 11 (from 8) and upgraded to a more recent version of Spring boot (2.2.7). Now, when I try to run, they often just terminate with no output. I see that enters my main method, but then as it begins the SpringApplication.run, it stops with no output. I have logging set to DEBUG level, so there would normally be plenty to see. This is a somewhat intermittent problem, as it sometimes does run. I have not been able to determine anything I can do to make sure it runs. Occasionally, I will get a Java JVM error, including a hs error file, which is too long to include here.
I do not know if that is a different issue or I just managed to get some output in this case.
I have tried changing memory parameters, including the type of garbage collection, but nothing seems to make a difference.
I am at a loss as to how to troubleshoot this issue, and any suggestions would be welcome.
Solution
This appears to be a result of the following bug:
JDK-8244611: Launching JVM with large '@' argument file causes random JVM crashes
I followed some of the advice given here:
STS4 fails to launch Spring Boot app with higher number of dependencies
In particular, I had to run using the Spring Tools Spring Boot App run configuration. I unchecked "Fast startup" on the Spring Boot tab and checked "Use temporary JAR..." on the Classpath tab.
Hope this helps anyone with the same issue.
Answered By - Todd
Answer Checked By - Candace Johnson (JavaFixing Volunteer)