Huolala Tech
Huolala Tech
May 23, 2025 · Backend Development

Why Adding a New JAR Causes StackOverflowError? Uncovering Spring Bean Recursion

This article walks through a real‑world case where adding a new JAR triggers a java.lang.StackOverflowError during Spring application startup, explains how hidden recursive calls in bean initialization cause the overflow, and offers debugging steps and a design‑level fix to prevent the issue.

Bean LifecycleDebuggingStackOverflowError
0 likes · 29 min read
Why Adding a New JAR Causes StackOverflowError? Uncovering Spring Bean Recursion
Java Interview Crash Guide
Java Interview Crash Guide
Aug 11, 2021 · Fundamentals

Why Understanding JVM Memory Structure Is Crucial for Java Developers

This article explains the purpose of learning the JVM memory layout, describes each runtime data area—including program counter, VM stack, native method stack, heap, and method area—highlights thread‑private versus shared regions, and provides code samples that trigger StackOverflowError and OutOfMemoryError across different JDK versions.

JVMJavaOutOfMemoryError
0 likes · 17 min read
Why Understanding JVM Memory Structure Is Crucial for Java Developers
Qunar Tech Salon
Qunar Tech Salon
May 9, 2018 · Backend Development

Resolving Spring Startup StackOverflowError Caused by @Autowired and MyBatis MapperFactoryBean

The article analyzes a StackOverflowError that occurs during Spring application startup after upgrading to JDK 8, tracing the deep bean‑creation call chain caused by extensive use of @Autowired with MyBatis MapperFactoryBean, and recommends upgrading mybatis‑spring and switching to @Resource to prevent the overflow.

@AutowiredDependencyInjectionJava
0 likes · 9 min read
Resolving Spring Startup StackOverflowError Caused by @Autowired and MyBatis MapperFactoryBean