harrah/xsbt — Issue #312: Getting java.io.Exception error=2 upon compilation
Author: jaimefjorge
Created: 2011-12-21 10:22:09+00:00
State: open

Hello,

First let me thank you for your hard work and dedication to this project.
It keeps getting better and better :).

I recently changed from sbt 0.11.0 to 0.11.2.
I installed it in my local computer and in my server.
My local installation ran fine and dandy but I seem to be getting an error on my server instance upon compilation:

[error] {file:/home/jaime/../}../compile:compile: java.io.IOException: Cannot run program "javac": java.io.IOException: error=2, No
such file or directory
[error] Total time: 16 s, completed Dec 21, 2011 1:07:33 PM

Can this be a memory problem?

posting my Build.scala and plugin/build.sbt to verify I'm not doing anything silly.

[Build.scala]

import sbt._

object Build extends sbt.Build {
import Dependencies._

lazy val myProject = Project(
"..",
file("."),
settings = basicSettings ++ WebPlugin.webSettings ++ Seq(
libraryDependencies ++= Seq(
Compile.akkaActor,
Compile.sprayServer,
Compile.sprayJson,
Compile.subcut,
Compile.h2,
Compile.scalaquery,
Compile.scalaz,
Test.specs2,
Container.jettyWebApp,
Container.akkaSlf4j,
Container.slf4j,
Container.logback
)
)
)

lazy val basicSettings = Defaults.defaultSettings ++ Seq(
organization := "com.example",
version := "0.1.2",
scalaVersion := "2.9.1",
mainClass	:= Some("cc.spray.connectors.Initializer"),
scalacOptions := Seq("-deprecation", "-encoding", "utf8"),
resolvers ++= Dependencies.resolutionRepos
)
}

object Dependencies {

val resolutionRepos = Seq(
"Akka Repository" at "http://akka.io/repository/",
ScalaToolsSnapshots,
"Scala Tools Snapshot" at "http://scala-tools.org/repo-releases/",
"Scala Tools Snapshot" at "http://scala-tools.org/repo-snapshots/"
)

object V {
val akka = "1.3-RC4"
val spray = "0.8.0-RC2"
val specs2 = "1.6.1"
val jetty = "8.0.3.v20111011"
val slf4j = "1.6.1"
val logback = "0.9.29"
val sJson	= "1.0.1"
val sprayCan= "0.9.1"
val sprayClient="0.8.0-RC3"
val sQuery = "0.9.5"
val h2	= "1.2.140"
}

object Compile {
val akkaActor = "se.scalablesolutions.akka" % "akka-actor" % V.akka % "compile"
val sprayServer = "cc.spray" % "spray-server" % V.spray % "compile"
val sprayJson	= "cc.spray.json"	% "spray-json_2.9.1"	% V.sJson % "compile"
val spraycan	= "cc.spray.can"	% "spray-can_2.9.1"	% V.sprayCan % "compile"
val scalaquery = "org.scalaquery"	% "scalaquery_2.9.0-1" % "0.9.5" % "compile"
val h2	= "com.h2database"	% "h2"	% "1.2.140" % "compile"
val subcut	= "org.scala-tools.subcut"	% "subcut_2.9.1"	% "1.0-SNAPSHOT" % "compile"
val scalaz	= "org.scalaz"	% "scalaz-core_2.9.1"	% "6.0.3" % "compile"
}

object Test {
val specs2 = "org.specs2" %% "specs2" % V.specs2 % "test"
}

object Container {
val jettyWebApp = "org.eclipse.jetty" % "jetty-webapp" % V.jetty % "container"
val akkaSlf4j = "se.scalablesolutions.akka" % "akka-slf4j" % V.akka
val slf4j = "org.slf4j" % "slf4j-api" % V.slf4j
val logback = "ch.qos.logback" % "logback-classic" % V.logback
}
}

[plugin/build.sbt]

resolvers += "Web plugin repo" at "http://siasia.github.com/maven2"

libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v + "-0.2.10"))

resolvers += Classpaths.typesafeResolver

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse" % "1.5.0")