How to correctly add "scalaz-core_2.10-7.0.0.jar" to scala project - scala

When I add "scalaz-core_2.10-7.0.0.jar" lib to build path my scala project following error appears:

Related

How to add external jar files to a spark scala project

I am trying to use an LSH implementation of Scala(https://github.com/marufaytekin/lsh-spark) in my Spark project.I cloned the repository with some changes to the sbt file (added Organisation)
To use this implementation , I compiled it using sbt compile and moved the jar file to the "lib" folder of my project and updated the sbt configuration file of my project , which looks like this ,
Now when I try to compile my project using sbt compile , It fails to load the external jar file ,showing the error message "unresolved dependency: com.lendap.spark.lsh.LSH#lsh-scala_2.10;0.0.1-SNAPSHOT: not found".
Am i following the right steps for adding an external jar file ?
How do i solve the dependency issue
As an alternative, you can build the lsh-spark project and add the jar in your spark application.
To add the external jars, addJar option can be used while executing spark application. Refer Running spark application on yarn
This issue isn't related to spark but to sbt configuration.
Make sure you followed the correct folder structure imposed by sbt and added your jar in the lib folder, as explained here - lib folder should be at the same level as build.sbt (cf. this post).
You might also want to check out this SO post.

Error: Could not find or load main class while trying to run spark from eclipse(scala ide 4.3)

i have build the project using sbt and imported into eclipse . while trying to execute from run configuration i cannot find my main class and on running the application its prompted with the following error : could not find the main class.i have installed spark-hadoop version 1.4 and scala version 2.10.6 in the local machine also changed the scala compiler version to 2.10.6 in scala ide . The same error is produced while trying build spark from eclipse using maven . Please advice..
Check if Your main class in on build path.
Project -> Properties -> Java Build Path -> Source tab
If not add appropriate folder(s).
Add the folder where classes are generated to build path -> configure build path -> java build path -> source -> "Default Output Folder" text box.
Check if you have .scala files included in compilation path.
Even if you have the source folder included, it may be possible that .scala files are not being picked up.
The following might help, I was facing the same issue and it solved the problem for me:
build path -> configure build path -> java build path -> source -> add **/*.scala in the Included section.

How to use Phantom in Scala IDE

I want to use phantom with my scala IDE.So for this i clone the git hub repository and created a .jar file of phantom using sbt -> compile -> package.I add this .jar file to build path in my Scala IDE but still while importing
import com.websudos.phantom.connectors._
is throwing error that
object connector is not a member of com.websudos.phantom.
While using auto complete function of scala ide it is showing only the import for
import com.websudos.phantom.example
.I don't know if the jar files got created for example then why it is not created for other.
I search in internet but all other option are given as to add dependency in sbt build path but i dont want to use it.
Use sbt-assebly instead to create a fat jar.
https://github.com/sbt/sbt-assembly

Scala project with maven in IntelliJ does not compile

I created a scala project and included Maven framework in it. After that the code doesn't compile and hence when I run the file, I end up getting the following error
Error: Could not find or load main class main.scala.TestSpark
Mark scala directory as Sources Root.

Play Project not compiling correctly in Intellij - routes_routing.scala

I have a simple Play project with one controller (with a route) and a unittest.
When I type "sbt compile test" into terminal it runs fine and the test passes.
I cannot get the solution to compile correctly in IntelliJ however.
Controller: controllers.nisp.LandingPageController
Compile error:
.../nisp-frontend/target/scala-2.11/src_managed/main/app/routes_routing.scala
Error:(37, 18) object LandingPageController is not a member of package app.controllers.nisp
controllers.nisp.LandingPageController.showLandingPage(),
^
Directory structure:
I have solved this issue using the following method:
Upgrade to Intellij 14
Upgrade to the latest scala plugin.
Remove the whole project directory and re-cloned the source.
Use File -> Import Project -> SBT -> Auto-Import.