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

Joda time #6

Closed
tobyweston opened this issue Jun 12, 2018 · 2 comments
Closed

Joda time #6

tobyweston opened this issue Jun 12, 2018 · 2 comments

Comments

@tobyweston
Copy link

tobyweston commented Jun 12, 2018

We're seeing problems with Joda time being excluded:

Exception in thread "shutdownHook3" Exception in thread "shutdownHook2" java.lang.NoClassDefFoundError: org/joda/time/DateTime
	at im.mange.flakeless.innards.FlightDataRecorder.record(FlightDataRecorder.scala:31)
	at im.mange.flakeless.Flakeless.$anonfun$record$1(Flakeless.scala:20)
	at scala.runtime.java8.JFunction1$mcVI$sp.apply(JFunction1$mcVI$sp.java:12)
	at scala.Option.foreach(Option.scala:257)
	at im.mange.flakeless.Flakeless.record(Flakeless.scala:20)
	at im.mange.flakeless.innards.Execute$.$anonfun$apply$3(Execute.scala:13)
	at im.mange.flakeless.innards.Execute$.$anonfun$apply$3$adapted(Execute.scala:13)
	at scala.Option.foreach(Option.scala:257)
	at im.mange.flakeless.innards.Execute$.apply(Execute.scala:13)
	at im.mange.flakeless.innards.WithoutElement$.apply(WithoutElement.scala:10)
	at im.mange.flakeless.Close.execute(Close.scala:17)
	at im.mange.flakeless.Close$.apply(Close.scala:9)
	at [snip]$2(PooledServer.scala:27)
	at scala.sys.ShutdownHookThread$$anon$1.run(ShutdownHookThread.scala:34)
java.lang.NoClassDefFoundError: org/joda/time/DateTime

How about switching from Joda time to Java 8's time? Can you see any problems in doing that?

It'd also make Circe/Argonaut straightforward as neither ship with a Joda time codec AFAIK.

@tobyweston
Copy link
Author

I have no idea why we'd gotten away with it before but we've had to add joda time into our build.sbt to get this running.

@alltonp
Copy link
Owner

alltonp commented Jun 14, 2018

Joda was almost certainly coming in from nscala-time, which im.mange.little depended on, at some point that must have changed. All of my projects were already depending on nscala-time so that's probably how it slept through the net.

It turns out that moving to java-time wasn't such a big deal. I've just pushed a new version, flakeless 0.0.186.

So, the only dependency that should be required is whichever version of webdriver you wish to use.

If you want to reduce the number of deps that webdriver brings in then I would recommend excluding any browsers you arent using.

i.e if you are just using chrome/canary the optimal setup is:

  "im.mange" %% "flakeless" % "0.0.186" % "test",
  "org.seleniumhq.selenium" % "selenium-java" % "3.12.0" % "test"
    exclude("org.seleniumhq.selenium", "selenium-safari-driver")
    exclude("org.seleniumhq.selenium", "selenium-firefox-driver")
    exclude("org.seleniumhq.selenium", "selenium-ie-driver")
    exclude("org.seleniumhq.selenium", "selenium-opera-driver")
    exclude("org.seleniumhq.selenium", "selenium-edge-driver")

Please try 0.0.186 and let me know how that goes.

@alltonp alltonp closed this as completed Jul 29, 2018
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

2 participants