Skip to content
Share
Explore

Guided Scenarios

Scenario 1 – Intermittent 500 Errors (NullPointer)

Scenario (remind them):
Users report: “Sometimes login works, sometimes it fails.”
Log snippet:
2025-11-07 10:32:45 ERROR AuthService - Failed to validate user
Caused by: java.lang.NullPointerException
at com.app.auth.UserValidator.validate(UserValidator.java:54)
at com.app.auth.AuthService.login(AuthService.java:37)

On screen/board:
Show the log and ask:
Ask the group:
“Where will you first look – top or bottom of the trace?”
“Which is the most important line here?”
Expected: NullPointerException + the line UserValidator.java:54
“Is this App / DB / Infra?”
Expected: App
“What could be null?”
Inputs from front-end? Returned DB object? Dependency not injected?
You model:
“Step 1: Identify exception type → NullPointer”
“Step 2: Identify location → Class + line number”
“Step 3: Classify → App issue”
“Step 4: Next actions: Check that line in code, see which object is null, maybe cross-check sample request payload in logs.”

Scenario 2 – CrashLoopBackOff (Config File Missing)

Scenario:
After deployment, service keeps restarting.
Log:
2025-11-06 12:10:10 ERROR org.springframework.boot.SpringApplication - Application run failed
Caused by: java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: java.io.FileNotFoundException: /opt/configs/app-config.yaml

Ask:
“What is the real root cause line?”
Expected: FileNotFoundException: /opt/configs/app-config.yaml
“Is this App, DB, or Infra/deployment?”
Expected: App/Infra boundary (config/deployment)
“Why does K8s keep restarting the pod?”
App exits with error → K8s restarts → loop.
“What would you do now?”
kubectl exec into pod, check file path, ConfigMap/volume mount.
You can quickly sketch the mental flow on board:
“Big exception → ApplicationContext fail → Caused by FileNotFound → Check filesystem & config.”


Scenario 3 – OutOfMemory

2025-11-06 12:42:31 ERROR [main] - Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.app.invoice.Generator.createReport(Generator.java:112)
at com.app.invoice.Service.generate(Service.java:45)

Task (write answers):
What is the root cause line?
Is this App / DB / Infra?
List two first actions you will take.
(Expected for debrief: – Root cause: OutOfMemoryError: Java heap space – Classification: App/JVM config – Actions: check heap usage with VisualVM/JConsole; review report size / memory heavy operations; consider increasing -Xmx.)

How to Run These 20 Minutes

5 mins – Give instructions and distribute scenarios.
10 mins – Groups discuss and fill answers.
5 mins – Quick debrief: pick 1 scenario, ask 1–2 groups to share their reasoning.
Encourage them to say the chain out loud:
“Exception type → Line → Domain → First action.”
That repetition builds the habit.

Log Triage Drill

Now do a fast round with short log snippets to build speed.

Format:

You show a snippet on screen.
Ask: “App, DB, or Infra?” and “What’s your first check?”
Let people shout answers / raise hands.

Mini-Case 1 – DB Credentials

Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

Classification: DB/config
First check: credentials in application.properties, DB user validity.

Mini-Case 2 – SQLSyntaxErrorException

Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

Classification: DB/schema
First check: table existence in DB, schema name, migrations.

Mini-Case 3 – HTTP 404

WARN org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/getUser]

Classification: App (routing)
First check: controller mapping, path, HTTP method.

Mini-Case 4 – Port Conflict

java.net.BindException: Address already in use: bind

Classification: Infra
First check: lsof -i :<port> or netstat.

Mini-Case 5 – Network to DB

Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

Classification: Infra/Network → DB
First check: ping DB host, check DB up, firewall, connection string.
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.