I have my lift project working perfectly on my local windows machine, and am now attempting to put it live on our RHEL5 server.
The project is in
ROOT/lift24
When I attempt to run
./sbt update ~jetty-run
in the lift24 folder I get the following after successful update:
[info] Compiling main sources...
[error] source file '/lift24/src/main/scala/code/api/UserAPI.scala;src/main/scala
/code/snippet/RoomDataSnippet.scala;src/main/scala/code/comet/UserServer.scala;
src/main/scala/code/comet/StreamServer.scala;src/main/scala/code/rogue
/QueryField.scala;src/main/scala/code/snippet/StreamSnippet.scala;src/main/scala
/code/comet/PresentationServer.scala;src/main/scala/code/comet
/PresentationComet.scala;src/main/scala/code/snippet/RoomCometSnippet.scala;src
/main/scala/bootstrap/liftweb/Boot.scala;src/main/scala/code/comet/ChatComet.scala;src
/main/scala/code/api/RoomAPI.scala;src/main/scala/code/snippet/UserSnippet.scala;src
/main/scala/code/comet/ChatServer.scala;src/main/scala/code/comet/StreamComet.scala;src
/main/scala/code/comet/UserComet.scala;src/main/scala/code/snippet
/ChatSnippet.scala;src/main/scala/code/snippet/PresentationSnippet.scala'
could not be found
All of the files are in
ROOT/lift24/src
It seems this is a path issue, but do not know how to tell sbt where to look.
Thanks in advance for any help, much appreciated :)
To fix this issue, just run:
sbt -clean
:)
Related
I am new to Giraph and hadoop.I am trying to compile giraph using maven i tried using command mvn -Phadoop_2 -fae -DskipTests clean install on command prompt but i am getting error.Image i attached is from eclipse(i am geting similar error in cmd as well.
GIRAPH version- 1.2.0 RC1
HADOOP version- 2.2.0
MAVEN version- 3.5.3
JAVA version 1.8.0_121
Any help in solving this problem will help me a lot. THANK YOU
I found a workaround for this as I was facing a similar problem.
mvn clean install -PallModules -Drat.numUnapprovedLicenses=200 -DskipTests
-Drat.numUnapprovedLicenses=200 This helps to suppress the error.
Thanks #leftjoin for the comment.
There must be a file created by Apache Rat in the path giraph-gora/target/rat.txt (as this is the failed project). This file will contain details on the files in your projects that do not have a proper licence (as well as the ones that do but these are not of any interest to you).
Most likely, the case is that the files produced by eclipse (.classpath, .project, org.eclipse.core.resources.prefs, org.eclipse.m2e.core.prefs,org.eclipse.jdt.core.prefs) are creating the problem. If you remove them you will be able to compile giraph properly.
I used Intellij for 4 months without any problems. Yesterday I installed it on another PC but I can't create a SBT Scala project.
Here the steps:
I create the project:
When started it says me that "SBT project need to be imported" so I click on "Enable Auto-Import" but then I get this error:
If I try to add Scala SDK from modules settings I get this error:
I downloaded Scala and SBT externally, I also tried all the suggested solutions from other similar threads but I can't resolve it.
How can I do?
Thank you in advance!
Add sbt.version to project/build.properties. You can check SBT version using sbt sbtVersion.
So I need to download scala for one of my classes. I am using a mac pro and the command line to do so.
I downloaded sbt using homebrew which worked fine.
After these are the directions given:
Install the SBT plugin:
mkdir ~/.sbt
mkdir ~/.sbt/0.13
mkdir ~/.sbt/0.13/plugins
echo 'addSbtPlugin("edu.umass.cs" % "cmpsci220" % "3.0.0")' > ~/.sbt/0.13/plugins/plugins.sbt
To verify that everything is installed, I have to type 'sbt' to start SBT. Once typed, I should see output that looks like this:
[info] Loading global plugins from /Users/arjun/.sbt/0.13/plugins
[info] Updating {file:/Users/arjun/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/edu.umass.cs/cmpsci/scala_2.10/sbt_0.13/3.0.0/jars/cmpsci.jar ...
[info] [SUCCESSFUL ] edu.cs#cmpsci;3.0.0!cmpsci.jar (1261ms)$
However, My issue is that once I type 'sbt' to verify things I get this line:
[info] Set current project to home (in build file:/Users/home/)
It asks me for a command. I have tried 'run', 'test', 'update'. They all run fine but it keeps asking me a command.
My goal is to get to the 'sbt console' so I can run scala, import packages, scripts, etc..
Any ideas on what the issue is?
You need to be in the folder of your SBT project to do sbt run.
First cd into it, then sbt run to run it (or sbt test or whatever :))
Type console at the sbt prompt.
Edit:
So actually, why do you think this is what you want? Are you trying to run scala code that you're given? Or are you trying to write scala code? If the latter, you should download intellij and the scala plugin.
Please make sure there is a scala file in the directory you run sbt.
You may also check this for others: http://www.scala-sbt.org/0.13/docs/Hello.html
I have to import scala project with sbt. Importing is ok. All dependencies is downloaded:
But at settings I see a bunch of errors:
This jars are downloaded. I couldn't figure out why this happen.
My test looks next:
How to solve this trouble?
Solution was installing SBT Execute plugin:
Running from SBT Commands compile task.
After this execution all is fine compiled and worked.
I have a project that builds well on Unix boxes (http://www.github.com/jhclark/ducttape).
However, using SBT 0.11.2 (and a few other versions of SBT), it will not build on my Mac (OSX 10.5). I get the following cryptic error message:
$ ~/bin/sbt compile (master*? 20:11)
[info] Loading project definition from /Users/jon/Documents/workspace- scala/ducttape/project
[info] Set current project to ducttape (in build file:/Users/jon/Documents/workspace-scala/ducttape/)
[info] Compiling 104 Scala sources to /Users/jon/Documents/workspace-scala/ducttape/target/scala-2.9.2/classes...
[error] error while loading <root>, error in opening zip file
[error] {file:/Users/jon/Documents/workspace-scala/ducttape/}default-024416/compile:compile: scala.tools.nsc.MissingRequirementError: object scala not found.
[error] Total time: 2 s, completed May 27, 2012 8:12:09 PM
This happens even after I clean things out thoroughly with:
sbt clean clean-files
rm -rf ~/.ivy2 ~/.m2 ~/.sbt
I suspect that the real error is happening in Maven2, which SBT uses for dependency management (see also Maven : error in opening zip file when running maven).
However, I'm stumped after several days. Any ideas?
I had similar problems when attempting to use an older version of the sbt-extras launcher with sbt-0.11.3. In my case, it attempted to download a file that didn't exist, and attempted to unzip the 404 error page. The most recent sbt-extras launcher has been fixed for sbt-0.11.3.
Yours sounds different, but they may be due to the the shutdown of scala-tools.org. If you can, I recommend upgrading to sbt-0.11.3.
If you need to continue to use 0.11.2, you should use the 0.11.3-2 launcher, put sbt.version=0.11.2 in project/build.properties, and disable the scalaTools repo in your build.sbt. Mark Harrah posted info on the SBT mailing list.
If this doesn't help, for some reason you're downloading corrupted .jars from somewhere.
Run the command find ~/.ivy2 ~/.m2 ~/.sbt -name "*.jar" -exec unzip -qqt {} \; to find which jar(s) are corrupted. The contents of the corrupt jar may give you a clue as to what's going wrong.
For completion, I had the same problem and it was a corrupt zip/jar file.
However, Dave's command line checks for the usual classpath directories, where your jar may be.
The one causing me troubles was in fact in my projects ./lib folder. I struggled with this for hours, hopefully this may help someone else.
PS: Thanks a lot Dave!
I just had the same problem (on OSX, and with Scala 2.10.2), but the problem turned out not to be in any of my dependency manager repos, or with SBT or Scala (as for some people).
I had put a JAR into /Library/Java/Home/lib/ext/ for other reasons, but didn't make it group- and world-readable. Only root (it's owner) could read it. I tweaked the permissions, and voila. Scala and SBT suddenly work again.
cd /Library/Java/Home/lib/ext
sudo chmod g+r bcprov-jdk15on-1.47.jar
sudo chmod g+a bcprov-jdk15on-1.47.jar