java - Playframework: InvocationTargetException -
i'm trying create simple login based on zentask sample, i'm getting runtime exception in smgts2\app\controllers\application.java @ line 43.
public static result authenticate() { form<login> loginform = form(login.class).bindfromrequest(); //line 43 if(loginform.haserrors()) { return badrequest(login.render(loginform)); } else { session("user_name", loginform.get().user_name); return redirect(
i've uploaded files in github: https://github.com/gscruz/smgts2-start
looking @ project on github, think main issues jpa annotations on accounts
model class models user_account
database table. mappings on model class exercised when bind form data login object, since login.validate
queries user_account
.
since name of class not match name of table, you'll need jpa @table
annotation explicitly state mapping:
@entity @table(name = "user_account") public class accounts extends model
you'll need @column
annotations fields names don't match corresponding columns. give go , see if gets further.
Comments
Post a Comment