I'm getting this error when creating a sbt project. I do have an Ubuntu-18.04 but don't know why it is picking that here.
Related
I am getting the below error while compiling my scala project-
object update_eori is not a member of package views.html
import views.html.update_eori
This is the package that I am using -
import views.html.update_eori
What could be possibly going wrong here?
P.S. I am completely new to coding
I tried to run the command sbt clean and then tried to compile again but same error persists.
Whenever I try to run my main program directly in IntelliJ I get this error:
Error:(5, 12) object apache is not a member of package org
import org.apache.commons.io.FileUtils
I'm getting a lot of errors like this when trying to import any dependencies.
I added this line of code to my pom.xml, which made it possible to build the project in a terminal with the "mvn clean install command"
<packaging>pom</packaging>
It still doesn't fix the errors in IntelliJ.
I am trying to build my project after upgrading to scala 2.12 and sbt 1.3.2. The build is successful in local but failing in my jenkins pipeline. One of the dependency is resolved but not available during compile time. Here are the details
The error I am seeing in jenkins pipeline is
[error] /home/jenkins/agent/workspace/scala-app/src/main/scala/com/org/project/utils/JavaHelper.scala:5:8:
object FutureCallback is not a member of package com.google.common.util.concurrent
[error] import com.google.common.util.concurrent.{FutureCallback, Futures, ListenableFuture}
The associated library is "com.google.guava" % "guava" % "26.0-android".
This dependency is obtained indirectly which I have validated through dependencyTree command.
scala: 2.12.15
sbt: 1.3.2
I even tried declaring the dependency explicitly in build.sbt however the issue still persists. I have tried the build in a clean environment as well (docker container) and it was success.
I am unable to figure out what could be the cause for this issue. Any help is much appreciated.
Thank you
Scala newbie here: I am attempting to get started with Scala using Windows 10 (Pro 10.0.18362 Build 18362) Hyper-v Quick Create of Ubuntu (18.04.3 LTS). I installed the JRE and JDK (11.0.4). I installed IntelliJ IDEA 2019.2.4. I added the Plugin for Scala (plugin 2019.2.37). I have left the SBT Executor 1.2.1 disabled for now: it was enabled earlier but it does not seem to affect the results. I tried to create the HelloWorld application (see below). I added the Scala Framework to the Project and, after encountering the error below, the Mavin framework (adding Mavin did not help.) After correcting the error in bulid.sbt it looks like this:
import com.sun.tools.javac.resources.version
name := "HelloWorld"
version := "0.1"
scalaVersion := "2.13.1"
I create a Scala worksheet by right-click on scala folder and selecting Scala Worksheet:
object Hello extends App {
println("Hello, World!")
}
I get a pop-up saying Maven project needs to be imported. This succeeds quickly. I get a second one saying sbt project needs to be imported. This fails:
sbt.librarymanagement.ResolveException: Error downloading org.scala-sbt:zinc-compile-core_2.12:1.3.1
and this error accompanies it:
not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/util-position_2.12/1.3.2/ivys/ivy.xml
The first ResolveException appears to be about a part of Mavin, but that should be present. This error message is followed by many other "not found" errors, but I assume they all stem from the above errors or are related. I cannot seem to find a solution: most of the information and examples on IntelliJ IDEA Scala on the web are several years (editions) out of date.
It appears Maven apps are to be deployed to Apache Spark. Not my intention, but in the Mavin panel I can successfully clean, validate and compile.
When I Run the Hello.sc app, I get this:
/snap/intellij-idea-community/185/jbr/bin/java -javaagent:/snap/intellij-idea-community/185/lib/idea_rt.jar=37033:/snap/intellij-idea-community/185/bin -Dfile.encoding=UTF-8 -classpath /home/perfwise/ideaProjects/HelloWorld/target/classes:/home/perfwise/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.1.jar:/home/perfwise/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.13.1.jar:/home/perfwise/.ivy2/cache/org.scala-lang/scala-library/srcs/scala-library-2.13.1-sources.jar:/home/perfwise/.ivy2/cache/org.scala-lang/scala-reflect/srcs/scala-reflect-2.13.1-sources.jar Hello
Error: Could not find or load main class Hello
Caused by: java.lang.ClassNotFoundException: Hello
Process finished with exit code 1
I would have expected this to work. Any pointers will be much appreciated.
I'm using intellij 14.0.2 build#ic-139.659 and scala plugin 1.2.1
Im working on a basic project for a while and everything went well until i rename a package name.
Since then im getting this error and i cant compile and run the program
Error:(10, 8) not found: object Repo
import Repo._
^
When i'm generating the same code to eclipse it compile and run well.
Is that a bug or i`m doing something wrong ?
thanks,
miki