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

NoSuchMethod error creating entries in Scala 2.11.12 / Spark 2.4.3 #59

Closed
arjtala opened this issue May 19, 2019 · 2 comments
Closed

NoSuchMethod error creating entries in Scala 2.11.12 / Spark 2.4.3 #59

arjtala opened this issue May 19, 2019 · 2 comments

Comments

@arjtala
Copy link

arjtala commented May 19, 2019

Hi, when trying the examples in the readme I run into this following error.
I have downloaded the jar to my local maven repo.

  • Spark 2.4.3
  • Scala 2.11.12
scala> import com.sizmek.rtree2d.core._
import com.sizmek.rtree2d.core._

scala> import SphericalEarth._
import SphericalEarth._

scala> val city1 = entry(50.0614f, 19.9383f, "Krakow")
java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V
  at com.sizmek.rtree2d.core.RTreeEntry.<init>(RTree.scala:332)
  at com.sizmek.rtree2d.core.Spherical.entry(Geometry.scala:107)
  at com.sizmek.rtree2d.core.Spherical.entry$(Geometry.scala:102)
  at com.sizmek.rtree2d.core.SphericalEarth$.entry(Geometry.scala:230)
  ... 53 elided
@arjtala arjtala changed the title NoSuchMethod error creating entries in Spark 2.4.3 NoSuchMethod error creating entries in Scala 2.11.12 / Spark 2.4.3 May 19, 2019
@plokhotnyuk
Copy link
Owner

@arjology please ensure that both Scala version and version of downloaded jar are matching.

Here is how it works in Scala REPL:

andriy@notebook:~$ /opt/scala-2.11.12/bin/scala
Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_212).
Type in expressions for evaluation. Or try :help.

scala> :require /home/andriy/Downloads/rtree2d-core_2.11-0.8.0.jar
Added '/home/andriy/Downloads/rtree2d-core_2.11-0.8.0.jar' to classpath.

scala> import com.sizmek.rtree2d.core._
import com.sizmek.rtree2d.core._

scala> import SphericalEarth._
import SphericalEarth._

scala> val city1 = entry(50.0614f, 19.9383f, "Krakow")
city1: com.sizmek.rtree2d.core.RTreeEntry[String] =
RTreeEntry(50.0614,19.9383,50.0614,19.9383,Krakow)

If you still have an error please provide exact steps to reproduce.

@arjtala
Copy link
Author

arjtala commented May 19, 2019

oh my goodness that was so simply ! thanks :)

@arjtala arjtala closed this as completed May 19, 2019
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