Exclude correct HikariCP version

See original GitHub issue

Hello,

Spring Boot 2.1.4-RELEASE uses Quartz 2.3.1 which contains hikaricp-java7 (since this release - see https://github.com/quartz-scheduler/quartz/issues/294) but the spring-boot-dependencies POM still excludes hikaricp-java6.

This causes an AbstractMethodError when using HikariCP and Quartz together.

Caused by: java.lang.AbstractMethodError: Receiver class com.zaxxer.hikari.metrics.micrometer.MicrometerMetricsTrackerFactory does not define or inherit an implementation of the resolved method abstract create(Ljava/lang/String;Lcom/zaxxer/hikari/metrics/PoolStats;)Lcom/zaxxer/hikari/metrics/MetricsTracker; of interface com.zaxxer.hikari.metrics.MetricsTrackerFactory.

Best regards Sebastian

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
oridoolcommented, Jul 27, 2020

I’m using latest springboot 2.3.2, and have the same issue mentioned above.

With springboot 2.3.1 , I didn’t get this error. As a workaround I added to my dependency:

    implementation ('org.springframework.boot:spring-boot-starter-quartz') {
        exclude group: 'com.zaxxer', module: 'HikariCP-java7'
        // workaround for https://github.com/spring-projects/spring-boot/issues/16489
    }

Before this exclusion, I had the following dependencies:

+--- org.springframework.boot:spring-boot-starter-quartz -> 2.3.2.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:2.3.2.RELEASE (*)
|    +--- org.springframework:spring-context-support:5.2.8.RELEASE (*)
|    +--- org.springframework:spring-tx:5.2.8.RELEASE (*)
|    \--- org.quartz-scheduler:quartz:2.3.2
|         +--- com.mchange:mchange-commons-java:0.2.15
|         +--- **com.zaxxer:HikariCP-java7:2.4.13**
|         |    \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
|         \--- org.slf4j:slf4j-api:1.7.7 -> 1.7.30

I’m not sure if that is an issue related to Quartz or to SpringBoot…

3reactions
wilkinsonacommented, Jul 28, 2020

Thanks for letting us know, @oridool. This is a bug in the dependency management plugin that the changes made for https://github.com/spring-projects/spring-boot/issues/21911 have exposed. I’ve opened https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/281.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to replace default hikari cp to tomcat pool on spring boot ...
I have found out the solution. This can be resolved in pom.xml by modifying like that:
Read more >
Configuring Hikari Connection Pool with Spring Boot
This step will force Spring Boot to look for the Hikari data source in the class path. We can use the Maven standard...
Read more >
Configuring a Hikari Connection Pool with Spring Boot
Learn how you can configure Hikari CP in your Spring Boot (1 and 2) ... However, to use the latest version, we need...
Read more >
Hikari Configuration for MySQL in Spring Boot 2
At times, you might want to use the latest HikariCP version. ... You can remove the statement and run this test to confirm...
Read more >
Hikari Connection Pool with Spring Boot made simple
If you are still running Spring Boot 1 applications, you have to exclude the default tomcat JDBC connection pool and add HikariCP Pool....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found