There is a conflict in the dependencies for spring-boot-starter-jdbc 3.3.2.

Hikari is asking for slf4j-api:1.7.36, while starter-logging wants org.slf4j:jul-to-slf4j:2.0.13.

Upon trying to run the attached hello world CommandLineRunner, an exception is thrown:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.helpers.NOPLoggerFactory loaded from file:/C:/Users/669326/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.helpers.NOPLoggerFactory
    at org.springframework.util.Assert.instanceCheckFailed(Assert.java:592)
    at org.springframework.util.Assert.isInstanceOf(Assert.java:511)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:401)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:128)
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:238)
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:220)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
    at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136)
    at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:75)
    at org.springframework.boot.SpringApplicationRunListeners.lambda$starting$0(SpringApplicationRunListeners.java:54)
    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118)
    at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:54)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
    at main.Main.main(Main.java:10)

Comment From: solr00t

jdbc-fail.zip Here's a minimal test project that fails to run.

Comment From: philwebb

If you run mvn dependency:tree you'll see the following output:

[INFO] --- dependency:3.6.0:tree (default-cli) @ jdbc-fail ---
[INFO] com.fedex.fltops:jdbc-fail:jar:1.0-SNAPSHOT
[INFO] \- org.springframework.boot:spring-boot-starter-jdbc:jar:3.3.2:compile
[INFO]    +- org.springframework.boot:spring-boot-starter:jar:3.3.2:compile
[INFO]    |  +- org.springframework.boot:spring-boot:jar:3.3.2:compile
[INFO]    |  |  \- org.springframework:spring-context:jar:6.1.11:compile
[INFO]    |  |     +- org.springframework:spring-aop:jar:6.1.11:compile
[INFO]    |  |     +- org.springframework:spring-expression:jar:6.1.11:compile
[INFO]    |  |     \- io.micrometer:micrometer-observation:jar:1.12.8:compile
[INFO]    |  |        \- io.micrometer:micrometer-commons:jar:1.12.8:compile
[INFO]    |  +- org.springframework.boot:spring-boot-autoconfigure:jar:3.3.2:compile
[INFO]    |  +- org.springframework.boot:spring-boot-starter-logging:jar:3.3.2:compile
[INFO]    |  |  +- ch.qos.logback:logback-classic:jar:1.5.6:compile
[INFO]    |  |  |  \- ch.qos.logback:logback-core:jar:1.5.6:compile
[INFO]    |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.23.1:compile
[INFO]    |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.23.1:compile
[INFO]    |  |  \- org.slf4j:jul-to-slf4j:jar:2.0.13:compile
[INFO]    |  +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO]    |  +- org.springframework:spring-core:jar:6.1.11:compile
[INFO]    |  |  \- org.springframework:spring-jcl:jar:6.1.11:compile
[INFO]    |  \- org.yaml:snakeyaml:jar:2.2:compile
[INFO]    +- com.zaxxer:HikariCP:jar:5.1.0:compile
[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO]    \- org.springframework:spring-jdbc:jar:6.1.11:compile
[INFO]       +- org.springframework:spring-beans:jar:6.1.11:compile
[INFO]       \- org.springframework:spring-tx:jar:6.1.11:compile

Maven always picks the closest dependency which means it's using org.springframework.boot:spring-boot-starter-jdbc:jar:3.3.2:compile -> com.zaxxer:HikariCP:jar:5.1.0:compile -> org.slf4j:slf4j-api:jar:1.7.36:compile where as Spring Boot needs org.slf4j:jul-to-slf4j:jar:2.0.13:compile.

Please use our BOM or parent starter to ensure you get the correct version. This section of the docs should help: https://docs.spring.io/spring-boot/maven-plugin/using.html#using.parent-pom