Requested array size exceeds VM limit: What It Really Means
Requested array size exceeds VM limit has nothing to do with free memory. Where Java's real max array length sits, why ArrayList stops early, and how to fix it.
Requested array size exceeds VM limit has nothing to do with free memory. Where Java's real max array length sits, why ArrayList stops early, and how to fix it.
A switch on a null String, enum, Integer or sealed type throws NullPointerException, and default won't catch it. Why, how 8 to 25 differ, and the fix.
Method.invoke wraps everything its target throws in an InvocationTargetException with no message. Here's how to see the real cause, on JDK 8 through 25.
A ThreadLocal that worked fine in a thread pool returns null the moment a virtual thread forks a subtask. Here's the mechanism, and what actually fixes it.
Virtual threads pinned by synchronized collapse throughput to your CPU count and can hang outright. Diagnose pinning on JDK 21 and fix it on 24+.
InvalidClassException: local class incompatible means the stream's serialVersionUID no longer matches your class. Here is why it drifted, and how to fix it without losing data.
java.io.IOException: Too many open files means you hit the descriptor limit. How to count FDs, find the leak with /proc and lsof, and set limits that hold.
NoClassDefFoundError and ClassNotFoundException look interchangeable and are not. Read the frames, find the real cause, and stop the repeat throws.
Decode the helpful NullPointerException message — Cannot invoke "String.length()" because "s" is null — find the exact null reference, and fix it for good.
ConcurrentModificationException usually has nothing to do with threads. Here is exactly what modCount does, why it fires, and the four fixes that actually work.