Closed johanandren closed 3 months ago
I used the approach from the PR in some sample project but that did not help, I had to use dependencyOverrides
as well.
Do you have some more details, we have hit this a couple times in Akka projects but exclude from jdbc (or Slick) has been enough. For example: https://github.com/akka/akka-persistence-r2dbc/pull/541/files#diff-ad2642dc77b3679e4ad2c7d3b2f59a2dcf48c1bf5b93a558a4fa44828315a34cL75
Would be good to know in what scenario that doesn't work.
Sebastian shared a reproducer with me and the problem is when pulling in both akka-persistence-jdbc, slick itself, and slick-hickaricp. Each of those would need a exclude("org.slf4j", "slf4j-api")
so it is easier to override that dependency with only one dependencyOverrides += "org.slf4j" % "slf4j-api" % "1.7.36"
entry in the build.
Probably messy on the maven side as well.
In 5.4.0 we bumped Slick to 3.5.0, which transitively pulls in slf4-api 2.2. Unfortunately slf4j had a binary break between 1.7 which is what is supported by Akka and 2.2, so this will cause grief for users. For example it may work without any linker/classdef not found errors but not find the configured logger.
Typical symptoms of this are having logback on classpath but seeing this on startup:
Would be good if we could somehow override/exclude the 2.2 dependency and force sl4j-api 1.7