Play Framework: PersistenceException: type is not registered object? (Ebean)

I am following a Play Framework 2.0 tutorial for Java and get this error when trying to save the ebean model ( task.save() ).

[PersistenceException: type [class models.Task] is not a registered organization? If you do not explicitly list the entity classes, using Ebean will look for them in the pathpath. If the object is in the Jar, check the ebean.search.jars property in the ebean.properties file or check ServerConfig.addJar ().]

+6
source share
1 answer

Check out these 3 points:

  • Your model is annotated with @Entity (javax.persistence.Entity)
  • Your model extends Model (play.db.ebean.Model)
  • Ebean is included in your application application.conf ebean.default="models.*" (If your classes are in the model package)
+27
source

Source: https://habr.com/ru/post/911411/


All Articles