Vaadin 23 (Flow) > 23.3.30 results in springboot slf4j runtime error

Hey folks, when updating my flow application from 23.2.28 to 23.3.30 (and later), I get a runtime error trying to set up slf4j’s binding to log4j2. Bisecting shows 23.3.28 works fine, 23.3.29 fails to compile, and 23.3.30+ fails at run with the below error. I’m using a gradle build, with spring boot 2.7.18. Any ideas what changed here and, perhaps, how to fix the error?

Caused by: java.lang.NoSuchMethodError: org.apache.logging.slf4j.Log4jLoggerFactory: method 'void <init>()' not found
    at org.slf4j.impl.StaticLoggerBinder.<init>(
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(

I don’t see any obvious that would cause that… not sure how it works with Gradle… but a dependency tree diff between both your versions would probably help to determine the real culprit

yeah, looooots of differences of course… It turns out that vaadin-spring-boot-starter:23.3.30 explicitly references logback, so you need to exclude it if you use slf4j with any other back end.

Yeah that’s mentioned in the release notes because of a CVE

Hmm - I’d say the place the release notes for platform 23.3.30 reference the change is … really vague. The issue I had isn’t the version update but the new explicit dependency on what should be completely optional packages. Oh well, I guess I have it working - thanks.