Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4 depends on Alpha Version of SLF4J #1746

Open
janhicken opened this issue Mar 1, 2021 · 9 comments
Open

Version 4 depends on Alpha Version of SLF4J #1746

janhicken opened this issue Mar 1, 2021 · 9 comments

Comments

@janhicken
Copy link

Hello,

since the latest major release of version 4.x.x, the dependency to slf4j-api uses version 2.0.0-alpha.

This is problematic, because the version is still unstable and also is binary incompatible to any 1.x.x bindings of SLF4J.

My current workaround is to set the version of slf4j-api explicitly using <dependencyManagement>.

@mikebell90
Copy link

This is in fact a problem and I assume @brettwooldridge did it for the same reasons as Jetty - the modularity stuff doesn't play nice with 1.7.x

@hoxu
Copy link

hoxu commented Apr 21, 2021

Is there any way to resolve this apart from 1) using unstable slf4j-api or 2) pinning HikariCP to a version prior to this change?

@janhicken
Copy link
Author

@hoxu Yes there is, just exclude the org:slf4j:slf4j-api dependency when including HikariCP or pin the slf4j-api version using dependencyManagement

@hoxu
Copy link

hoxu commented Apr 23, 2021

For deps.edn, I ended up using the following:

com.zaxxer/HikariCP
{:mvn/version "4.0.3" :exclusions [org.slf4j/slf4j-api]

@guizmaii
Copy link

guizmaii commented Aug 30, 2021

Hi @brettwooldridge,

We're in a kind of blocked situation today because of HikariCP.

Lots of libraries using HikariCP, like doobie or Quill (in the Scala world) for example, can't update to the v4 nor v5 versions of HikariCP because of the SFL4J version used (2.0.0-alpha1) but, when using JLink to package our apps, we need the v4 or v5 of HikariCP otherwise we end up with the following error that prevent us to build our apps:

> jdeps --multi-release 11 -R <classpath>

 Exception in thread "main" java.lang.module.FindException: Module hibernate.core not found, required by com.zaxxer.hikari

What can we do to move forward to fix this issue? 🤔
Can we maybe rollback the update of SLF4J to go back to the v1.7.x in the v5 branch of Hikari? 🤔

For now, the only "fix" we have as users is to use the version 3.4.3 of HikariCP which doesn't contain the "problematic" changes made in 3.4.4. 😕

@apavlychev
Copy link

Hi @brettwooldridge,

We're in a kind of blocked situation today because of HikariCP.

Lots of libraries using HikariCP, like doobie or Quill (in the Scala world) for example, can't update to the v4 nor v5 versions of HikariCP because of the SFL4J version used (2.0.0-alpha1) but, when using JLink to package our apps, we need the v4 or v5 of HikariCP otherwise we end up with the following error that prevent us to build our apps:

> jdeps --multi-release 11 -R <classpath>

 Exception in thread "main" java.lang.module.FindException: Module hibernate.core not found, required by com.zaxxer.hikari

What can we do to move forward to fix this issue?
Can we maybe rollback the update of SLF4J to go back to the v1.7.x in the v5 branch of Hikari?

For now, the only "fix" we have as users is to use the version 3.4.3 of HikariCP which doesn't contain the "problematic" changes made in 3.4.4.

You can exclude it like
("org.tpolecat" %% "doobie-quill" % V.Doobie).exclude("org.slf4j", "*")

@devurandom
Copy link

org.slf4j/slf4j-api {:mvn/version "2.0.0"} was released: https://mvnrepository.com/artifact/org.slf4j/slf4j-api

Maybe HikariCP could be updated to it, since it is at least a stable version?

@astappiev
Copy link

Please, upgrade to ^2.0.0 as we are getting Receiver class org.apache.logging.slf4j.SLF4JServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequesteApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider. when trying to combine it with log4j-slf4j2-impl.
Changing the version to 2.0.3 fixes the issue.

@OrangeDog
Copy link

HikariCP 5 is still using the alpha version of slf4j with JDK 11+.

If it really is necessary for some reason, then update to an actual release. Otherwise stick with 1.7.x for all releases.

guizmaii added a commit to guizmaii/zio-quill that referenced this issue Jun 5, 2023
See brettwooldridge/HikariCP#1746 (comment)

We can't update to `5.0.x` as it's not compiled for Java8
juliano added a commit to zio/zio-quill that referenced this issue Jun 6, 2023
See brettwooldridge/HikariCP#1746 (comment)

We can't update to `5.0.x` as it's not compiled for Java8

Co-authored-by: Juliano Alves <von.juliano@gmail.com>
joelsonoda pushed a commit to joelsonoda/zio-quill that referenced this issue Jun 27, 2023
See brettwooldridge/HikariCP#1746 (comment)

We can't update to `5.0.x` as it's not compiled for Java8

Co-authored-by: Juliano Alves <von.juliano@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants