scala-ide

spark - scala init error on build

陌路散爱 提交于 2019-12-11 00:31:34
问题 I'm trying to use spark in my scala application. this is my spark dependency I'm using : <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-core_2.10</artifactId> <version>1.0.0</version> </dependency> Then in my code import org.apache.spark.SparkConf val sparkConf = new SparkConf() There is no error in my eclipse IDE, But code build ( mvn package exec:java ) is failed with the following error: error: class file needed by SparkConf is missing. [ERROR] reference type Cloneable

Why would a Scala Worksheet using Scala-IDE give this as an error?

穿精又带淫゛_ 提交于 2019-12-10 23:55:44
问题 In a Scala worksheet I can do this: object Play { println("Playing a bit") //> Playing a bit case class X(a: Int = 1, x: List[X]){ } } but I can't do this: object Play { case class X(a: Int = 1, x: List[X]){ } } In the latter it will complain after the case class that ; was expected but import found 回答1: This seems to be a bug that is fixed in the latest nightly build of Scala IDE. See https://stackoverflow.com/a/12767214/770361 来源: https://stackoverflow.com/questions/12615964/why-would-a

Error in Scala Compiler: java.lang.AssertionError: assertion failed (even when project dependency is specified in Eclipse)

依然范特西╮ 提交于 2019-12-10 21:56:42
问题 I get the following error(stack trace at the end) when I try to compile my Scala project in Eclipse. It says that assertion failed on a Java class TransportConf (which is in a project spark-network-common which is specified in the Java Build Path). I checked the target folder and the TransportConf.class exists Possible cause for issue as it was working before: I was merging code from upstream/master into my project and new dependencies were introduced. I normally run sbt {reload, eclipse with

Scala execution times in Eclipse

核能气质少年 提交于 2019-12-10 16:38:32
问题 There's something fishy going on when I run Scala programs from Eclipse. I run an App object and it takes 7.8 s to run (actual execution time timed with System.nanoTime in the object). When I run the same .class file from the command line it takes 2.5 s. I notice above the Console window it says <terminated> Run(1)[Scala Application] C:\Program Files\Java\jre6\bin\javaw.exe I wonder if this has any bearing on the times. Also, here are my eclipse.ini settings, which I set according to the

Classes in Worksheet in Scala-IDE cause error

时光毁灭记忆、已成空白 提交于 2019-12-10 15:38:55
问题 Just instantiating a class by typing the following into a Worksheet (note, Worksheet, created with File > New > Scala Worksheet, a .sc file, not a normal .scala file) and clicking Save causes a spurious error: Mouseover: "Multiple markers at this line - illegal start of simple expression - ';' expected but identifier found." I doubt something as simple as this could have slipped through testing so maybe it's a configuration issue. I've tried it on 2 machines and get the same behaviour: 1)

setting correct scala version on scala ide

有些话、适合烂在心里 提交于 2019-12-10 10:40:10
问题 I'm trying to work on a project on scala IDE but I've having build problems on scala IDE. On sbt the project builds fine. I used the eclipse sbt plugin and imported the project on scala IDE. There were build errors, which makes the ide close to useless. One of the errors is Compiler plugin paradise_2.12.1-2.1.0.jar is cross-compiled with incompatible version for this project: 2.12.1 vs 2.12.2 I thought scala minor versions were compatible, though I see there is an exception for some

Scala IDE 4.0.0 thinks there's errors in an out-of-the-box Play Framework 2.3.7 program

泄露秘密 提交于 2019-12-08 22:55:18
问题 I've created a Play Framework program via Typesafe Activator (so it follows the template exactly). I used sbteclipse-plugin version 3.0.0 to create an Eclipse project and imported that into Scala IDE 4.0.0. These are all the latest versions at the time of writing. The Scala IDE definitely seems to support the Play Framework. It has syntax highlighting for the custom formats, including the routing file and templates. Yet, it doesn't seem to be able to find the views from the controllers. In

Object spark is not a member of package org

帅比萌擦擦* 提交于 2019-12-08 16:07:31
问题 When importing the following in Eclipse Scala-IDE import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ I get this error: Object spark is not a member of package org I installed the sbt-0.13.9.msi What else should I do? build.sbt name := "scala-spark-app" version := "1.0" scalaVersion := "2.10.4" libraryDependencies += "org.apache.spark" %% "spark-core" % "1.5.2" 回答1: I was receiving the same compilation error (on my Mac) with IntelliJ whereas sbt compile executed

Using a custom enum in the Scala Worksheet I am receiving an error: java.lang.ExceptionInInitializerError

廉价感情. 提交于 2019-12-08 02:47:27
问题 UPDATE - 2014/Sep/17 It turns out that even the solution in the prior update (from 2013/Feb/19) fails to work if one places println(Value.Player2) as the first command; i.e. the ordinals are still assigned incorrectly. I have since created a verifiable working solution as a Gist. The implementation waits to assign the ordinals until after all JVM class/object initialization completes. It also facilitates extending/decorating each enumeration member with additional data while still being very

ScalaMacros and Eclipse

拥有回忆 提交于 2019-12-07 00:56:03
问题 I am trying to compile a (Scala) macro in Eclipse 3.7.2 with the Scala IDE Plugin available for Scala 2.10.0-M3, but I am experiencing the following error: "macro implementation not found: XXXXX (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them) if you do need to define macro implementations along with the rest of your program, consider two-phase compilation with -Xmacro-fallback-classpath in the second phase pointing