scala-plotly-client
scala-plotly-client copied to clipboard
java.lang.NoSuchMethodError issue
Hi, I am getting this error when I tried to run the sample in your readme file.
"Exception in thread "main" java.lang.NoSuchMethodError: co.theasi.plotly.writer.Server.$init$(Lco/theasi/plotly/writer/Server;)V"
Platform: Windows 10 Scala version: Scala 2.10
Does scala plotly client work in Windows?
I see no reason it would not work on Windows. It only supports Scala 2.11 and 2.12, however.
Machine: Scala 2.12.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_144.
Upgraded to Scala 2.12, but the issue did not get resolved. Providing more detailsif this helps
Code:
import co.theasi.plotly.writer.Server
import co.theasi.plotly.{Plot, draw, writer}
implicit val server = new Server {
val credentials = writer.Credentials("YYYYYY", "XXXXXXXXXXXXXXXXXXX")
val url = "https://api.plot.ly/v2/"
}
val p = Plot().withScatter(Vector(1, 2), Vector(3, 4))
draw(p, "custom-credentials")
Error message:
java.lang.NoSuchMethodError: co.theasi.plotly.writer.Server.$init$(Lco/theasi/plotly/writer/Server;)V
at #worksheet#.$anon$1.
(Note- I am running this on the IntelliJ worksheet)