i have written an app that runs locally with no issues
after deploying app to Heroku when trying to enter a certain page i receive the following error (taken from log):
- 2012-02-29T00:11:53+00:00 app[web.1]: Internal Server Error (500) for request GET /Application/adminPage
- 2012-02-29T00:11:53+00:00 app[web.1]: Template not found (In /app/controllers/Application.java around line 78)
- 2012-02-29T00:11:53+00:00 app[web.1]:
- 2012-02-29T00:11:53+00:00 app[web.1]: at play.mvc.Controller.renderTemplate(Controller.java:667)
- 2012-02-29T00:11:53+00:00 app[web.1]:
- 2012-02-29T00:11:53+00:00 app[web.1]: play.exceptions.TemplateNotFoundException: Template not found : Application/admin.html 2012-02-29T00:11:53+00:00 app[web.1]: The template Application/admin.html does not exist.
/app/controllers/Application.java around line 78 :
public static void admin(){
List<MailUSer> allUsers = MailUSer.findAll();
render(allUsers);
}
rout file:
# Home page
GET / Application.index
GET / module:secure
POST /Register/welcome Register.welcome
GET /Application/adminPage Application.admin
# Ignore favicon requests
GET /favicon.ico 404
# Map static resources from the /app/public folder to the /public path
GET /public/ staticDir:public
# Catch all
* /{controller}/{action} {controller}.{action}
what am i doing wrong ?
I had this problem on Heroku, and it was case-insensitivity.
In my controller, I had something like
public static void showUser(Long id) {
...
render(user);
}
but in my views folder I had
app/views/Application/showuser.html
On my Mac, and Windows machine, this is fine, but on Linux machines, including Heroku, the file showUser.html
will not be found.
try to troubleshoot using the following items:
Application/admin.html
is different from application/admin.html
etc)? When you are in a windows platform this is okay, but when you deloy app to a linux/unix environment, this going to break your app.BTW, MailUSer
looks strange, why not MailUser
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With