question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Scala 2.12

See original GitHub issue

Hi @MrPowers !

Today I started my journey with Apache Spark, once I learned that Spark 2.4.0 can be run with Scala 2.12. So, I forked your https://github.com/MrPowers/spark-sbt.g8 giter8 template, tweaked it somewhat to work with current stable Scala version, and then I got a run-time error.

My hunch is that the release of spark-fast-tests I am using, is for Scala 2.11.X only, and might not be binary compatible with next Scala 2.12.X libraries (ScalaTest?).

The error I am getting is this:

[info] MannersSpec:
[info] com.intersysconsulting.TubularSpec *** ABORTED *** (28 milliseconds)
[info]   java.lang.NoSuchMethodError: com.github.mrpowers.spark.fast.tests.DatasetComparer.$init$(Lcom/github/mrpowers/spark/fast/tests/DatasetComparer;)V
[info]   at com.intersysconsulting.TubularSpec.<init>(TubularSpec.scala:11)
[info]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[info]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[info]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[info]   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[info]   at java.lang.Class.newInstance(Class.java:442)
[info]   at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:435)
[info]   at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:304)
[info]   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[info]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[info]   ...
[info] com.intersysconsulting.MannersSpec *** ABORTED *** (4 milliseconds)
[info]   java.lang.NoSuchMethodError: com.github.mrpowers.spark.fast.tests.DatasetComparer.$init$(Lcom/github/mrpowers/spark/fast/tests/DatasetComparer;)V
[info]   at com.intersysconsulting.MannersSpec.<init>(MannersSpec.scala:10)
[info]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[info]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[info]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[info]   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[info]   at java.lang.Class.newInstance(Class.java:442)
[info]   at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:435)
[info]   at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:304)
[info]   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[info]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[info]   ...
[error] Uncaught exception when running com.intersysconsulting.MannersSpec: java.lang.NoSuchMethodError: com.github.mrpowers.spark.fast.tests.DatasetComparer.$init$(Lcom/github/mrpowers/spark/fast/tests/DatasetComparer;)V
[error] sbt.ForkMain$ForkError: java.lang.NoSuchMethodError: com.github.mrpowers.spark.fast.tests.DatasetComparer.$init$(Lcom/github/mrpowers/spark/fast/tests/DatasetComparer;)V
[error] 	at com.intersysconsulting.MannersSpec.<init>(MannersSpec.scala:10)
[error] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[error] 	at java.lang.Class.newInstance(Class.java:442)
[error] 	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:435)
[error] 	at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:304)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)

My complete source code, so that you can reproduce the error above is here: https://github.com/oscarvarto/learning-spark/ I am depending on a SBT-1.X compatible plugin, as shown here: https://github.com/oscarvarto/learning-spark/blob/master/project/plugins.sbt#L3-L4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
snithishcommented, Nov 15, 2018

@oscarvarto - thanks for opening this issue & for the PRs.

I am going to start by removing the spark-daria dependency from spark-fast-tests, so we can circumvent the circular dependency issue entirely.

We can then work on getting spark-fast-tests built with Scala 2.12. After that’s done, we can focus on getting spark-daria built with Scala 2.12. I’m looking forward to collaborating with you on this!

cc: @snithish

This is interesting, I will have a look too, when I find some free time

1reaction
MrPowerscommented, Nov 15, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Scala 2.12.0 is now available!
We are planning to add (some) support for Java 9 in the near future. Full Java 9 support will be part of the...
Read more >
Scala is a Maintenance Nightmare - MungingData
Many Scala projects dropped support for Scala 2.11 long before Spark users were able to upgrade to Scala 2.12. Spark devs frequently needed...
Read more >
Using Scala 2.12 with Spark 2.x - Stack Overflow
Spark does not support Scala 2.12. You can follow SPARK-14220 (Build and test Spark against Scala 2.12) to get up to date status....
Read more >
scala@2.12 - Homebrew Formulae
Bottle (binary package) installation support provided. Current versions: stable, ✓, 2.12.17. Other versions: scala@2.13, 2.13.
Read more >
Spark Release 2.4.0
Barrier Execution Mode: [SPARK-24374] Support Barrier Execution Mode in the scheduler, to better integrate with deep learning frameworks. Scala 2.12 Support: [ ...
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