javac error when running a Play app deployed with Jenkins

924 views
Skip to first unread message

Pramod

unread,
Oct 20, 2011, 8:50:11 AM10/20/11
to play-framework
Hi,
I am using Play 1.2.3 with the play-scala module. I am deploying to a
remote machine using Jenkins and SSH. The application starts but I get
this error when trying to load a page. It works fine if I login to the
remote machine manually, cd to the application directory, and run
"play start" on the command line! I have tried exporting JAVA_HOME and
setting $PATH correctly. That didn't help.

Internal Server Error (500) for request GET /

Oops: IOException
An unexpected error occured caused by exception IOException: Cannot
run program "javac": java.io.IOException: error=2, No such file or
directory

play.exceptions.UnexpectedException: Unexpected Error
at play.Play.start(Play.java:525)
at play.Play.detectChanges(Play.java:610)
at play.Invoker$Invocation.init(Invoker.java:186)
at Invocation.HTTP Request(Play!)
Caused by: java.io.IOException: Cannot run program "javac":
java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:380)
at sbt.AbstractProcessBuilder.run(ProcessImpl.scala:134)
at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply$mcI
$sp(ProcessImpl.scala:165)
at sbt.AbstractProcessBuilder$$anonfun$runBuffered
$1.apply(ProcessImpl.scala:165)
at sbt.AbstractProcessBuilder$$anonfun$runBuffered
$1.apply(ProcessImpl.scala:165)
at sbt.BufferedLogger.liftedTree1$1(BufferedLogger.scala:25)
at sbt.BufferedLogger.buffer(BufferedLogger.scala:25)
at sbt.AbstractProcessBuilder.runBuffered(ProcessImpl.scala:165)
at sbt.AbstractProcessBuilder.$bang(ProcessImpl.scala:162)
at sbt.Compiler$$anonfun$forkJavac$1.apply(Compiler.scala:90)
at sbt.Compiler$$anonfun$forkJavac$1.apply(Compiler.scala:88)
at sbt.compiler.JavaCompiler$$anonfun$forkJavac$1.externalJavac
$1(JavaCompiler.scala:49)
at sbt.compiler.JavaCompiler$$anonfun$forkJavac$1$$anonfun$apply
$4.apply(JavaCompiler.scala:50)
at sbt.compiler.JavaCompiler$$anonfun$forkJavac$1$$anonfun$apply
$4.apply(JavaCompiler.scala:50)
at sbt.compiler.JavaCompiler$$anonfun$withArgumentFile
$1.apply(JavaCompiler.scala:69)
at sbt.compiler.JavaCompiler$$anonfun$withArgumentFile
$1.apply(JavaCompiler.scala:66)
at sbt.IO$.withTemporaryDirectory(IO.scala:218)
at sbt.compiler.JavaCompiler$.withArgumentFile(JavaCompiler.scala:66)
at sbt.compiler.JavaCompiler$$anonfun$forkJavac
$1.apply(JavaCompiler.scala:50)
at sbt.compiler.JavaCompiler$$anonfun$forkJavac
$1.apply(JavaCompiler.scala:46)
at sbt.compiler.JavaCompiler$$anonfun$directOrForkJavac
$1.apply(JavaCompiler.scala:42)
at sbt.compiler.JavaCompiler$$anonfun$directOrForkJavac
$1.apply(JavaCompiler.scala:38)
at sbt.compiler.JavaCompiler$$anon$1.apply(JavaCompiler.scala:24)
at sbt.AggressiveCompile$$anonfun$5$$anonfun$compileJava$1$1.apply$mcV
$sp(AggressiveCompile.scala:75)
at sbt.classfile.Analyze$.apply(Analyze.scala:88)
at sbt.AggressiveCompile$$anonfun$5.compileJava
$1(AggressiveCompile.scala:74)
at sbt.AggressiveCompile$$anonfun$5.apply(AggressiveCompile.scala:78)
at sbt.AggressiveCompile$$anonfun$5.apply(AggressiveCompile.scala:56)
at sbt.inc.IncrementalCompile$$anonfun$doCompile
$1.apply(Compile.scala:21)
at sbt.inc.IncrementalCompile$$anonfun$doCompile
$1.apply(Compile.scala:19)
at sbt.inc.Incremental$.cycle(Incremental.scala:34)
at sbt.inc.Incremental$.compile(Incremental.scala:21)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:17)
at sbt.AggressiveCompile.compile2(AggressiveCompile.scala:86)
at sbt.AggressiveCompile.compile1(AggressiveCompile.scala:37)
at sbt.AggressiveCompile.apply(AggressiveCompile.scala:27)
at sbt.Compiler$.apply(Compiler.scala:101)
at
play.scalasupport.compiler.PlayScalaCompiler.update(ScalaCompiler.scala:
55)
at play.scalasupport.ScalaPlugin.update(ScalaPlugin.scala:199)
at play.scalasupport.ScalaPlugin.compileSources(ScalaPlugin.scala:98)
at play.plugins.PluginCollection.compileSources(PluginCollection.java:
349)
at
play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:
397)
at play.Play.start(Play.java:485)
... 3 more

Roch Delsalle

unread,
Mar 2, 2012, 12:04:15 PM3/2/12
to play-fr...@googlegroups.com
Hi,

You need to install a JDK

Roch

2011/10/20 Pramod <pramodb...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


Reply all
Reply to author
Forward
0 new messages