Play Framework 2.0.1-服务器仅响应第一个请求 [英] Play framework 2.0.1 - Server only responding to the first requests
问题描述
我在Play 2.0或2.0.1上有一个奇怪的行为:第一个或 Play会快速满足前几个请求!服务器,但是 它不再响应了.
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.
我在几个项目(包括问候语示例应用程序)上重现了该问题: -启动玩转" -转到 http://localhost:9000 ->确定 -点击刷新几次:请求被锁定,浏览器被锁定 刚刚加载.
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.
我对Firefox和Chrome的行为相同.
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.
我正在使用Mac OS X Lion和Java 7 Update 4.
I 'm using Mac OS X Lion and Java 7 update 4.
预先感谢, 问候
推荐答案
谢谢.
它确实与Java 7有关.我终于使它工作了,花了我几个小时才知道如何做.
It was indeed related to Java 7. I finally got it working, it took me a couple of hours to find out how.
似乎为Java 7路径定义了JAVA_HOME变量会产生一些冲突.
It seems that having the JAVA_HOME variable defined to the Java 7 path is generating some conflict.
评论我的.bashrc中的导出行可以解决问题:
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
这篇关于Play Framework 2.0.1-服务器仅响应第一个请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!