Play framework 2.0.1 - Server only responding to t

2019-07-18 03:42发布

I have a strange behavior with either Play 2.0 or 2.0.1 : the first or first few requests are served quickly by the Play! server, but then it's not responding anymore.

I reproduced the problem on several projects including the hello word sample application : - lauching "play run" - Go to http://localhost:9000 -> ok - Hit refresh a few times : the requests are locked, the browser is just loading.

I have the same behavior with Firefox and Chrome.

I guess it's a setup problem, and I may be missing something trivial, but I can't see what.

I 'm using Mac OS X Lion and Java 7 update 4.

Thanks in advance, Regards

3条回答
可以哭但决不认输i
2楼-- · 2019-07-18 04:00

Upgrading to Play 2.0.2 appears to work, as mentioned in mkeoller's comment.

查看更多
Deceive 欺骗
3楼-- · 2019-07-18 04:09

Thank you.

It was indeed related to Java 7. I finally got it working, it took me a couple of hours to find out how.

It seems that having the JAVA_HOME variable defined to the Java 7 path is generating some conflict.

Commenting the export line in my .bashrc solved the problem :

PATH=$PATH:/Users/raphaellemaire/tools/play-2.0.1

#export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
查看更多
Bombasti
4楼-- · 2019-07-18 04:10

It is known that Play reacts weirdly when using Jdk 7. Check the mailing list, several issues have been noticed.

Seems like the only viable solution IMO. (Using same setup as you otherwise and no problems at all)

查看更多
登录 后发表回答