google-app-engineplayframeworkcrudsiena

Cannot configure crudsiena module for play framework 1.2.2


i'm trying to create basic application on Play Frramework(1.2.2) + siena (2.0.2) + crudsiena(2.0.1) + gae(1.4). all of these i got from play's dependency management system. I was follwing sample in documentation and i got an strange error:

Not found els.list action not found

and than same "eaten" class names later in routes that was registered:

GET /admin/? els.index

GET /admin/mymodels els.list

GET /admin/mymodels/new els.blank

GET /admin/mymodels/{id} els.show

Stack trace is very strait forward to:

play.exceptions.ActionNotFoundException: Action els.index not found
    at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:585)
    at play.mvc.ActionInvoker.resolve(ActionInvoker.java:84)
    at Invocation.HTTP Request(Play!)
Caused by: java.lang.Exception: Controller controllers.els not found
    ... 3 more

my files look like:

app/models/MyModels.java:

package models;

import controllers.CRUD;
import controllers.CRUD.For;

@For(models.MyModel.class)
public class MyModels extends CRUD {

}

app/models/MyModel.java:

package models;

import java.util.Date;

import siena.Id;
import siena.Model;

public class MyModel extends Model {
    @Id
    Long id;
    String name;
    String description;
    Integer price;
    Boolean avaliable;
    Date menuItemCreated;

}

+ route set to /admin module:crudsiena + dependencies.yml added lines about gae, siena and crudsiena

other files are left unchanged.

Does anybody know what i'm doing wrong ?

Thanks in advice.


Solution

  • Why does your controller is in the package models? shouldn't it be in package controllers?