I use Spring Boot release 2.3.1 and openJDK11 for my project wich is modular application.
My pom declares spring-boot-starter-parent:2.3.1.RELEASE
as a parent, so I used versions of maven dependencies defined by spring-boot-dependencies-2.3.1.RELEASE
. I noticed conflicts between few versions of maven dependencies and the version of HikariCP. These conflicts are about the java modules names : HikariCP:3.4.5
has maven dependencies whose java module names are not the same as those in the versions defined by spring-boot-dependencies.
Here a few conflicts I pointed out :
Maven Artifact | Version in HikariCP 3.4.5 | Module name used by HikariCP version | Version in spring-boot-dependencies-2.3.1.RELEASE | Module name in the jar of the spring boot version |
---|---|---|---|---|
slf4j-api | 1.7.25 | slf4j.api (default automatic module name) | 1.7.30 | org.slf4j (Automatic-Module-Name in manifest) |
hibernate-core | 5.2.10.Final | hibernate.core (default automatic module name) | 5.4.17.Final | org.hibernate.orm.core (Automatic-Module-Name in manifest) |
metrics-core | 3.2.4 | metrics.core (default automatic module name) | 4.1.9 | com.codahale.metrics (Automatic-Module-Name in manifest) |
metrics-healthcheck | 3.2.4 | metrics.healthcheck (default automatic module name) | 4.1.9 | com.codahale.metrics.health (Automatic-Module-Name in manifest) |
... and so on
The workaround I found is to override spring-boot-dependencies-version so I can run my application but it is a bit disturbing. So I suggest to downgrade the versions of maven dependencies waiting that HikariCP upgrades ones
NB1 : The HikariCP jar declares a module-info from jdk version 11 NB2 : The problem has also been pointed out in a HikariCP issue
Comment From: wilkinsona
Thanks for the suggestion. Unfortunately, we cannot downgrade numerous dependencies for everyone to avoid a problem that's specific to use of the module path and HikariCP. HikariCP is the right place to tackle this. In the meantime you can either avoid using the module path, downgrade the dependencies to meet your specific needs, or patch HikariCP to use up-to-date module names.
Comment From: FBibonne
Ok thank you. Finally the simpliest workaround I found is to downgrade temporarily to spring boot 2.2.7
Comment From: wilkinsona
If you want a more focussed workaround, another option is to only downgrade HikariCP. The problematic module-info.java
was added in HikariCP 3.4.4 so you could downgrade to 3.4.3 until a fix is available.
Comment From: testphreak
Hi @wilkinsona, I ran into the same issue @FBibonne ran into while upgrading my module path project from v2.2.6
to v2.3.4
. Your suggestion to downgrade HikariCP to v3.4.3
worked great up until v2.3.3
/v2.2.9
!
But with the current v2.2.10
and v2.3.4
releases, my service fails to connect on the default port (8080) or any port for that matter even when it starts successfully. I even have debug logging turned on, but the service doesn't show any errors or warnings on startup. Do you have an idea what might be going on with the latest version?
I know maybe this isn't a lot to go on. I can definitely create a separate bug with additional information to discuss it, but just wanted to check first you were aware of this issue.
Comment From: wilkinsona
@testphreak We're not aware of any issues similar to what you have described. If you would like us to investigate, please do open a new issue and provide a complete and minimal sample that reproduces the problem. You can share the sample with us by pushing it to a separate repository on GitHub or by attaching it to the issue that you open.