java.lang.OutOfMemoryError: Java Heap Space: Diagnosis and Fixes
Fix java.lang.OutOfMemoryError: Java heap space by checking -Xmx, capturing a heap dump and finding what retains memory in Eclipse MAT.
Focused explanations and longer guides, with worked scenarios, common mistakes and interview exercises across every chapter.
Showing 49–72 of 200 articles
Fix java.lang.OutOfMemoryError: Java heap space by checking -Xmx, capturing a heap dump and finding what retains memory in Eclipse MAT.
Fix UnsupportedClassVersionError (class file version 65.0 vs 61.0) by matching the runtime JDK to your build or compiling with javac --release.
Why Arrays.asList and List.of throw UnsupportedOperationException on add or remove, and how to choose a mutable copy or an immutable list.
Fix 'blocked by CORS policy' fetch errors: which headers the server must send, preflights, credentials, dev proxies and why no-cors fails.
Fix TypeError: Cannot read properties of undefined by finding which value is missing, reading the stack trace and repairing the data flow.
Fix SyntaxError: Cannot use import statement outside a module in Node and browsers: type module, .mjs, require of ESM and __dirname in ESM.
How to write a JavaScript Error subclass that keeps its name, stack and cause, when instanceof fails, and what to catch versus rethrow.
Fix TypeError: x is not a function in JavaScript: wrong imports, shadowed names, lost this, a missing semicolon or .map on a non-array.
Fix RangeError: Maximum call stack size exceeded: missing base cases, self-calling setters, circular data, huge spreads and deep recursion.
Fix ReferenceError: x is not defined: typos, block scope, the TDZ, window or require missing in Node, and scripts that load in the wrong order.
Fix SyntaxError: Unexpected token '<' in JSON from fetch: the server sent HTML. Check res.ok and content-type, then read the body as text.
Fix Uncaught (in promise) errors and Node crashes from unhandled rejections: missing await, async forEach, fire-and-forget and rethrown errors.
Fix Node.js 'listen EADDRINUSE: address already in use :::3000': find the process holding the port, close servers on restart, use PORT and port 0.
Fix 'npm error code EACCES permission denied' on global installs without sudo: change the npm prefix, use nvm or fnm, prefer npx, fix Docker.
Fix npm 'code ERESOLVE unable to resolve dependency tree': read the peer conflict report, upgrade the right package, use overrides with care.
Fix the React warning 'Cannot update a component while rendering a different component': a child sets parent state during render.
Fix 'Invalid hook call' in React: hooks in class components, callbacks or plain functions, duplicate React copies and mismatched react-dom.
Fix 'Maximum update depth exceeded' in React: effects with no or unstable dependencies, setState in componentDidUpdate and ref callbacks.
Fix 'Objects are not valid as a React child' in React: rendering objects, Dates, Errors or props, plus async components on the client.
Why React state isn't updated immediately after setState: render snapshots, batching, functional updaters, mutation and when to use useEffect.
Fix 'Too many re-renders' in React: a state setter runs during render, often onClick={setX(1)} or state synced in the component body.
Why is an @Autowired or @Value field null in Spring Boot? Objects built with new, static fields and constructor timing, and how to fix them.
Fix 'the dependencies of some of the beans in the application context form a cycle' in Spring Boot 3 by redesigning beans, not flags.
Fix 'blocked by CORS policy' for a Spring Boot 3 API: global CORS config, Spring Security preflight handling, credentials and exposed headers.
No notes match that… try another filter.