Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

play framework 2.0 console error

When trying to run the new play 2.0 console (typing 'play' in cmd) on windows from project folder (as instructed by framework web tutorial).

i receive :

C:\temp\play-2.0\play-2.0\todolist>play
[info] Loading project definition from C:\temp\play-2.0\play-2.0\todolist\projec
t
[error] Server access Error: Connection timed out: connect url=http://repo.types
afe.com/typesafe/ivy-releases/org.hibernate/hibernate-validator/4.2.0.Final/ivys
/ivy.xml
[error] Server access Error: Connection timed out: connect url=http://repo.types
afe.com/typesafe/ivy-releases/javax.validation/validation-api/1.0.0.GA/ivys/ivy.
xml
[error] Server access Error: Connection timed out: connect url=http://repo.types
afe.com/typesafe/ivy-releases/org.springframework/spring-context/3.0.7.RELEASE/i
vys/ivy.xml
[error] Server access Error: Connection timed out: connect url=http://repo.types
afe.com/typesafe/ivy-releases/org.springframework/spring-core/3.0.7.RELEASE/ivys
/ivy.xml
[error] Server access Error: Connection timed out: connect url=http://repo.types
afe.com/typesafe/ivy-releases/org.springframework/spring-beans/3.0.7.RELEASE/ivy
s/ivy.xml

list goes on and on...

what is wrong , and why is it trying to access remote locations when all i want to do is use console/run app ?

like image 555
sam ray Avatar asked Mar 18 '12 16:03

sam ray


People also ask

How do I run Playframework?

You can run the created application and view the result in the default browser http://localhost:9000. To run a Play application: Create a new Run Configuration – From the main menu, select Run -> Edit Configurations. Click on the + to add a new configuration.

How do I run in production mode?

The easiest way to start an application in production mode is to use the start command from the Play console. This requires a Play installation on the server. When you run the start command, Play forks a new JVM and runs the default Netty HTTP server.

How do I run a debug in play framework?

Generate configuration To debug, start your application with activator -jvm-debug 9999 run and in Eclipse right-click on the project and select Debug As, Debug Configurations. In the Debug Configurations dialog, right-click on Remote Java Application and select New. Change Port to 9999 and click Apply.


2 Answers

I had the same problem, I resolved it by modifying the last line of build.bat file in play/framework like this :

java -Dhttp.proxyUser=MyProxyAccount -Dhttp.proxyPassword=MyProxyPwd -Dhttp.proxyHost=MyProxyIp -Dhttp.proxyPort=MyProxyPort -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*

Hope this help.

like image 92
Michael Laffargue Avatar answered Oct 17 '22 00:10

Michael Laffargue


Are you connected to the internet when you type the command play?

Ivy is a dependency manager, and it creates a local repository for dependencies used to build a project.

like image 27
pnairn Avatar answered Oct 17 '22 00:10

pnairn