Maik Klein
Maik Klein

Reputation: 16158

Java Play! 2 does not recompile

I got play running perfectly but I loaded the sample project forms and changed it a little bit. And now I am experiencing a problem that I can not fix by myself.

My routes look like this:

# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~

# Home page
GET     /                           controllers.Login.blank()
# Login
GET     /login                      controllers.Login.blank()
# Signup
GET     /signup                     controllers.SignUp.blank()
GET     /users/fakeuser             controllers.SignUp.edit()
POST    /signup                     controllers.SignUp.submit()

# Contact
GET     /contacts                   controllers.Contacts.blank()
GET     /contacts/fakecontact       controllers.Contacts.edit()
POST    /contacts                   controllers.Contacts.submit()

# Map static resources from the /public folder to the /assets URL path
GET     /assets/*file               controllers.Assets.at(path="/public", file)

As you can see the first two lines are redirecting to Login.blank()

the problem is if I do:

cd forms
play
run

And go to localhost:9000/login

I get the following error:

Action not found
1GET/controllers.Application.index()
2GET/signupcontrollers.SignUp.blank()
3GET/users/fakeusercontrollers.SignUp.edit()
4POST/signupcontrollers.SignUp.submit()
5GET/contactscontrollers.Contacts.blank()
6GET/contacts/fakecontactcontrollers.Contacts.edit()
7POST/contactscontrollers.Contacts.submit()
8GET/assets/$file<.+>controllers.Assets.at(path:String = "/public", file:String)

As you can see Play! didn't update the routes file. It uses the old one.

Any idea how I can fix this?

Upvotes: 2

Views: 423

Answers (1)

ndeverge
ndeverge

Reputation: 21564

Do a play clean and then play run.

Sometimes, Play have problems with the routes file.

Upvotes: 4

Related Questions