Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play framework hangs on startup at: "Loading project definition from"

I am just getting started with Play Framework. I have downloaded and installed play and created a sample java application. When I try to start the play console in the application directory it hangs at "Loading project definition".

PS C:\dev\play\javatest> play.bat Getting org.scala-sbt sbt_2.9.1 0.11.3 ... :: retrieving :: org.scala-sbt#boot-app         confs: [default]         37 artifacts copied, 0 already retrieved (7245kB/283ms) [info] Loading project definition from C:\dev\play\myFirstApp\project 

When i try running a Scala application i get a message about it waiting for a lock:

PS C:\dev\play\scalatest> play [info] Loading project definition from C:\dev\play\test1\project Waiting for lock on C:\lib\play\repository\.sbt.ivy.lock to be available... 

Running Windows 7, JDK 1.7.0_05 and Play Framework 2.0.2. Any ideas?

like image 380
Peter Moberg Avatar asked Jul 07 '12 08:07

Peter Moberg


2 Answers

I just experienced this myself with Play 2 and it turns out it wasn't truly hanging, it was just pulling a maven and downloading the Internet. To verify this is the same behavior you were experiencing edit project/plugins.sbt and replace:

logLevel := Level.Warn 

with

logLevel := Level.Debug 

(Though I am building on OSX I imagine you will experience similar output on Windows.)

like image 163
cfeduke Avatar answered Sep 22 '22 07:09

cfeduke


Just to add to existing answer here,

I am also seeing this behaviour after I upgraded from Play 2.2x to Play 2.3.x ( see MigrationGuide )

I was debugging as follows below.

On Linux, goto your project folder and then:

$ bash -x `which sbt` .... OUTPUT SKIPPED.... ++ ((  128 < 512  )) ++ local 'common_opts=-Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m' ++ [[ 1.7.0_55 < 1.8 ]] ++ local perm=256 ++ echo '-Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m' + execRunner java -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -jar /usr/share/sbt-launcher-packaging/bin/sbt-launch.jar + [[ -n '' ]] + [[ -n '' ]] + java -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -jar /usr/share/sbt-launcher-packaging/bin/sbt-launch.jar 

Note down the command in last line, cancel the current process Ctrl+C, and execute it adding -verbose option to java:

java -verbose -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -jar /usr/share/sbt-launcher-packaging/bin/sbt-launch.jar 

Finally I also added logLevel := Level.Debug in project/plugins.sbt.

However, it keeps giving output like this:

.... OUTPUT SKIPPED.... info]   [SUCCESSFUL ] org.apache.maven.doxia#doxia-sink-api;1.1!doxia-sink-api.jar (2065ms) [debug]         tried http://repo.typesafe.com/typesafe/ivy-releases/org.apache.maven.doxia/doxia-logging-api/1.1/jars/doxia-logging-api.jar [debug] CLIENT ERROR: Not Found url=http://repo.typesafe.com/typesafe/ivy-releases/org.apache.maven.doxia/doxia-logging-api/1.1/jars/doxia-logging-api.jar [debug]         tried http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.maven.doxia/doxia-logging-api/1.1/jars/doxia-logging-api.jar [debug] CLIENT ERROR: Not Found url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.maven.doxia/doxia-logging-api/1.1/jars/doxia-logging-api.jar [debug]         tried /home/saleem/.ivy2/local/org.apache.maven.doxia/doxia-logging-api/1.1/jars/doxia-logging-api.jar [debug]         tried http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar [info] downloading http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar ... [debug]     public: downloading http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar [debug]     public: downloading http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar.sha1 [debug] sha1 OK for http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar [info]  [SUCCESSFUL ] org.apache.maven.doxia#doxia-logging-api;1.1!doxia-logging-api.jar (3997ms) [debug]         tried http://repo.typesafe.com/typesafe/ivy-releases/org.apache.maven/maven-plugin-registry/2.2.1/jars/maven-plugin-registry.jar [debug] CLIENT ERROR: Not Found url=http://repo.typesafe.com/typesafe/ivy-releases/org.apache.maven/maven-plugin-registry/2.2.1/jars/maven-plugin-registry.jar [debug]         tried http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.maven/maven-plugin-registry/2.2.1/jars/maven-plugin-registry.jar [debug] CLIENT ERROR: Not Found url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.maven/maven-plugin-registry/2.2.1/jars/maven-plugin-registry.jar [debug]         tried /home/saleem/.ivy2/local/org.apache.maven/maven-plugin-registry/2.2.1/jars/maven-plugin-registry.jar [debug]         tried http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-registry/2.2.1/maven-plugin-registry-2.2.1.jar [info] downloading http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-registry/2.2.1/maven-plugin-registry-2.2.1.jar ... [debug]     public: downloading http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-registry/2.2.1/maven-plugin-registry-2.2.1.jar [debug]     public: downloading http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-registry/2.2.1/maven-plugin-registry-2.2.1.jar.sha1 [debug] sha1 OK for http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-registry/2.2.1/maven-plugin-registry-2.2.1.jar [info]  [SUCCESSFUL ] org.apache.maven#maven-plugin-registry;2.2.1!maven-plugin-registry.jar (2025ms) [debug]         tried http://repo.typesafe.com/typesafe/ivy-releases/backport-util-concurrent/backport-util-concurrent/3.1/jars/backport-util-concurrent.jar [debug] CLIENT ERROR: Not Found url=http://repo.typesafe.com/typesafe/ivy-releases/backport-util-concurrent/backport-util-concurrent/3.1/jars/backport-util-concurrent.jar [debug]         tried http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/backport-util-concurrent/backport-util-concurrent/3.1/jars/backport-util-concurrent.jar [debug] CLIENT ERROR: Not Found url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/backport-util-concurrent/backport-util-concurrent/3.1/jars/backport-util-concurrent.jar [debug]         tried /home/saleem/.ivy2/local/backport-util-concurrent/backport-util-concurrent/3.1/jars/backport-util-concurrent.jar [debug]         tried http://repo1.maven.org/maven2/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar [info] downloading http://repo1.maven.org/maven2/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar ... [debug]     public: downloading http://repo1.maven.org/maven2/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar .... OUTPUT SKIPPED.... 

There appears to be too many jars to be downloaded. I am now using offline version of Typesafe Activator ( 356MB download here ), and this is so much faster!

like image 33
tuxdna Avatar answered Sep 19 '22 07:09

tuxdna