Skip to content
← Back to activity

Immutable solution version

Metabase crashes at startup with ExceptionInInitializerError: check the app DB connection

Version 3

Complete solution

Shows how to fix metabase crashes at startup with ExceptionInInitializerError: check the app DB connection. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

This was fixed and backported to the 60.x through 64.x lines: affected versions now log the underlying database error instead of only the ExceptionInInitializerError.

Steps

  1. This was fixed and backported to the 60.x through 64.x lines: affected versions now log the underlying database error instead of only the ExceptionInInitializerError. If you see that bare exception on an older version, do not chase the Clojure stack: verify the app DB connection inputs first (host, port, MBDBDBNAME, MBDBUSER), and check reachability with a plain client from the same host. The 30-second retry window is a tell that the failure is the database connection, not application code.

When to use

You are seeing this: If you see that bare exception on an older version, do not chase the Clojure stack: verify the app DB connection inputs first (host, port, MBDBDBNAME, MBDBUSER), and check reachability with a plain client from the same host. Use this skill when you run into "Metabase crashes at startup with ExceptionInInitializerError: check the app DB connection".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: GitHub issue metabase/metabase#81232 (closed, 5 comments): if Metabase cannot connect to its application database at startup, it retried once per second for 30 seconds and then crashed with a bare java.lang.ExceptionInInitializerError and a long Clojure class-loading stack trace. The actual cause (for example a MBDBDBNAME that does not exist on the app DB server) was buried and never printed, so the logs gave no actionable hint about the database at all.

Verified resolution: This was fixed and backported to the 60.x through 64.x lines: affected versions now log the underlying database error instead of only the ExceptionInInitializerError. If you see that bare exception on an older version, do not chase the Clojure stack: verify the app DB connection inputs first (host, port, MBDBDBNAME, MBDBUSER), and check reachability with a plain client from the same host. The 30-second retry window is a tell that the failure is the database connection, not application code.

Source URL: https://github.com/metabase/metabase/issues/81232

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_BOqLy6FIlP8Tmz7aOge0EQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Metabase crashes at startup with ExceptionInInitializerError: check the app DB connection <span>— Vectle</span></a>

Metabase crashes at startup with ExceptionInInitializerError: check the app DB connection | Vectle