enragedginger / akka-quartz-scheduler

Quartz Extension and utilities for cron-style scheduling in Akka
Other
559 stars 114 forks source link

Version conflict on HikariCP when switched to Play 2.7.x #83

Closed PawelLipski closed 4 years ago

PawelLipski commented 5 years ago

Bumping Play to 2.7.x forces bumping play-slick to 4.0.0… which depends on slick-hikaricp 3.3.0 which depends on HikariCP 3.2.0.

The latest akka-quartz-scheduler (1.8.0-akka-2.5.x) depends (via quartz 2.3.0) on HikariCP-java6 2.3.13 (which gets evicted).

Any attempt to run the app ends in a missing method or not class found, don’t remember which one exactly :/

Is there any non-surgical solution to that problem (i.e. other than shading)?... I see quartz hasn't been updated beyond 2.3.0 yet :(

enragedginger commented 5 years ago

If you want to submit a PR with updated dependencies, I'll take a look at it.

PawelLipski commented 5 years ago

I see that quartz 2.4.0-SNAPSHOT depends on updated HikariCP (3.2.0) that also Play 2.7.0 depends on:

https://github.com/quartz-scheduler/quartz/blob/master/pom.xml

 <properties>
...
    <revision>2.4.0-SNAPSHOT</revision>

...

    <slf4j.version>1.7.7</slf4j.version>
    <c3p0.version>0.9.5.3</c3p0.version>
    <hikaricp.version>3.2.0</hikaricp.version>
    <log4j.version>1.2.16</log4j.version>
    <gmaven-plugin.version>1.4</gmaven-plugin.version>

The problem is that most likely you don't want akka-quartz-scheduler to depend on a non-stable version of quartz, right? :/

PawelLipski commented 5 years ago

And I don't see any clue as to when 2.4.0 is meant to become a stable release... https://github.com/quartz-scheduler/quartz/milestones

voukka commented 5 years ago

+1 to make it work with deps of Play 2.7.x

enragedginger commented 5 years ago

@PawelLipski Thanks for looking in to this. If you haven't done so already, can you open an issue with the Quartz folks linking back here and try to find out what their timetable is for a release? It'd be nice to keep this library compatible with the latest versions of Play, but, much like yourself, I want to avoid having to put in classloader hacks.

PawelLipski commented 5 years ago

@enragedginger In the meantime someone posted an issue in quartz regarding 2.3.1 (https://github.com/quartz-scheduler/quartz/issues/406)... and I don't think the answer for 2.4.0 will be any different than that :(

One thing we can do is to upvote the comment https://github.com/quartz-scheduler/quartz/issues/406#issuecomment-474534873 to hasten the 2.3.1 release... this version itself only bumps Hikari to 2.4.13 (not 3.2.0), but hopefuly once they're done with 2.3.1 they will go on to 2.4.0 :)

PawelLipski commented 5 years ago

@enragedginger Quartz 2.3.1 should be available on Maven Central soon. Let's now chase them to release 2.4.0 because that's what matters for us ;) https://github.com/quartz-scheduler/quartz/issues/409

pawelkaczor commented 5 years ago

:+1: I'm facing the same problem when trying to upgrade to akka-persistence-jdbc ver. 3.5.0.

fliptoo commented 5 years ago

+1

Reeebuuk commented 5 years ago

Seems like they're not planning on releasing 2.4.0 anytime soon :/

mam-ijinus commented 4 years ago

+1 :) don't works with play 2.8 image

vasyl-zhurba commented 4 years ago

Quartz has changed its dependency scope of HikaryCP to provided. Is not it a matter of rebuilding the project with latest quartz scheduler version?

PawelLipski commented 4 years ago

@mam-ijinus btw, what tool did you generate that dependency tree with?

mam-ijinus commented 4 years ago

I remove my dependency but it must be: https://github.com/jrudolph/sbt-dependency-graph

BTW, I direcktly used akka.actor.ActorSystem.scheduler() to do what I want( send an email very day at 17h00)

giannoug commented 4 years ago

Can confirm this is still an issue with Play 2.8.0. After adding the akka-quartz-scheduler dependency, you get the following: NoSuchMethodError: 'void com.zaxxer.hikari.HikariConfig.setInitializationFailTimeout(long)'

vasyl-zhurba commented 4 years ago

My solution to fix that problem was to exclude hikariCP: "com.enragedginger" %% "akka-quartz-scheduler" % versions.akkaQuartz exclude ("com.zaxxer", "HikariCP-java6")

enragedginger commented 4 years ago

Hi everyone,

Thank you to everyone who tracked this down and contributed to troubleshooting it. Quartz scheduler 2.4.0 still hasn't released. @vasyl-zhurba Although Quartz has updated their scope for Hikari-CP to be provided, that change isn't available in their latest release build 2.3.2; it looks like it won't be available until their 2.4.0 build.

So for now, I've just upgraded to Quartz 2.3.2 and changed our dependency on Quartz to exclude HikariCP-java7.

These changes are available in the new 1.8.3 build series.