I am new to the Play framework.I connected Play with mysql.But the data I am submitting through the form I have created is not adding in the database table.I am getting an exception
[PersistenceException: java.sql.SQLException: Connection is closed!]
The code I used is
public static Result addBar(){
Bar bar= Form.form(Bar.class).bindFromRequest().get();
bar.save();
return redirect(routes.Application.index());
}
I am new to the Play framework.I connected Play with mysql.But the data I am submitting through the form I have created is not adding in the database table.I am getting an exception
[PersistenceException: java.sql.SQLException: Connection is closed!]
The code I used is
public static Result addBar(){
Bar bar= Form.form(Bar.class).bindFromRequest().get();
bar.save();
return redirect(routes.Application.index());
}
0 commentaires:
Enregistrer un commentaire