Raphaël Lemaire
Raphaël Lemaire

Reputation: 1309

Play framework 2.0.1 - Server only responding to the first requests

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

Upvotes: 2

Views: 1323

Answers (3)

Drew Johnson
Drew Johnson

Reputation: 19213

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

Upvotes: 0

Raphaël Lemaire
Raphaël Lemaire

Reputation: 1309

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

Upvotes: 1

i.am.michiel
i.am.michiel

Reputation: 10404

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)

Upvotes: 1

Related Questions