Tired of Googling the same Java errors over and over?
I built StackLens, a CLI tool that analyzes your logs or stack traces and tells you what went wrong and how to fix it.
How it works
java -jar stacklens.jar analyze --text "java.lang.NullPointerException at UserService.java:42"
Output:
Issue: NullPointerException
Severity: HIGH
Explanation: A method was called on a null object reference at UserService.java:42
Suggested Fix: Add null checks before accessing the object, or use Optional<T>
You can also analyze a full log file:
java -jar stacklens.jar analyze --file app.log
Or get JSON output to pipe into other tools:
java -jar stacklens.jar analyze --file app.log --format json
What it detects
- NullPointerException
- OutOfMemoryError
- Connection refused
- Database connection failures
- HTTP 500 errors
- Thread pool exhaustion
- Timeouts
- Authentication errors
No Maven required
Linux/macOS:
curl -L https://github.com/AbaSheger/stacklens/releases/latest/download/stacklens.jar -o stacklens.jar
java -jar stacklens.jar analyze --text "your stack trace here"
Windows (PowerShell):
Invoke-WebRequest-Uri"https://github.com/AbaSheger/stacklens/releases/latest/download/stacklens.jar"-OutFile"stacklens.jar"java-jarstacklens.jaranalyze--text"your stack trace here"
Built with Java 17 + picocli. 51 unit tests. Open source.
GitHub: https://github.com/AbaSheger/stacklens
Would love feedback — especially on error types you'd want added.