Spring Boot "APPLICATION FAILED TO START" in CI
The "APPLICATION FAILED TO START" banner is Spring Boot's FailureAnalyzer summarizing a startup exception. The real fix is in the "Description" and "Action" lines that follow it, not in the banner itself.
What this error means
A bootRun, java -jar, or @SpringBootTest step prints a large "APPLICATION FAILED TO START" banner with a Description and Action section, then exits non-zero.
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.Common causes
A startup exception was translated into a friendly report
A FailureAnalyzer caught an exception during context refresh (missing DataSource, unresolved placeholder, bean error) and printed a human-readable Description and Action.
CI environment differs from local
The banner appears in CI because a service, env var, or profile present on your machine is absent on the runner, so a bean or config that works locally now fails.
How to fix it
Read the Description and Action lines
- Scroll to the "Description:" block, that is the actual failure.
- Apply the "Action:" hint (add a dependency, set a property, define a bean).
- Re-run the job and confirm the banner is gone.
Reproduce the same profile and env locally
Run with the CI profile and the same variables so the failure surfaces before push.
SPRING_PROFILES_ACTIVE=ci ./gradlew bootRunHow to prevent it
- Set
spring.profiles.activeexplicitly in CI so config is deterministic. - Provide every externalized property the runner needs via env or a ci profile.
- Read the Action block first, it usually names the exact remedy.