Play framework hangs on startup at: “Loading project definition from”

前端 未结 3 930
我寻月下人不归
我寻月下人不归 2020-12-13 03:24

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 applic

相关标签:
3条回答
  • 2020-12-13 03:59

    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.)

    0 讨论(0)
  • 2020-12-13 04:18

    Try aborting your build, deleting the referenced lock file then doing a 'play run' again.

    0 讨论(0)
  • 2020-12-13 04:23

    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!

    0 讨论(0)
提交回复
热议问题