Note that there are some explanatory texts on larger screens.

plurals
  1. POError : RuntimeException: No JPA EntityManagerFactory configured for name [default]
    text
    copied!<p>i got this error : [RuntimeException: No JPA EntityManagerFactory configured for name [default]] when i try create action search in database.</p> <p>MODELS --- user.java</p> <pre><code>@Entity public class User extends Model{ @Required public String MaKH; @Id public Integer Id; @MinLength(6) public String Ten; public String Diachi; public Integer SDT; public User() {} public User(String MaKH,String Ten,String Diachi,Integer SDT,Integer Id){ this.Diachi=Diachi; this.MaKH=MaKH; this.Ten=Ten; this.SDT=SDT; this.Id=Id; } // Find method static for request public static Finder&lt;Long,User&gt; find = new Finder(Long.class,User.class); public static List&lt;User&gt; searchByName(String name){ return find.where().like("Ten", "%"+name+"%").findList(); } } </code></pre> <p>CONTROLLER --- Application.java</p> <p>public class Application extends Controller {</p> <pre><code> public static Result index() { return ok(index.render()); } @Transactional public static Result search() { DynamicForm form = form().bindFromRequest(); String name = form.get("Ten"); User.searchByName(name); return ok(result.render()); </code></pre> <p>} }</p> <p>ROUTES</p> <pre><code>GET / controllers.Application.index() POST /search controllers.Application.search() </code></pre> <p>Application.conf</p> <pre><code> db.default.driver=com.mysql.jdbc.Driver db.default.url="jdbc:mysql://localhost/search" db.default.user=root db.default.password=123456 db.default.jndiName=DefaultDS ebean.default="models.*" </code></pre> <p>Please help me solved it :D</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload